From 1adba473e6917b227e1b0a1118148101dca202e7 Mon Sep 17 00:00:00 2001 From: Manuel Traut Date: Mon, 31 Mar 2014 16:53:55 +0200 Subject: add quellcode Signed-off-by: Manuel Traut --- quellcode/versuch1/cpx.cpp | 92 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100755 quellcode/versuch1/cpx.cpp (limited to 'quellcode/versuch1/cpx.cpp') diff --git a/quellcode/versuch1/cpx.cpp b/quellcode/versuch1/cpx.cpp new file mode 100755 index 0000000..3424d72 --- /dev/null +++ b/quellcode/versuch1/cpx.cpp @@ -0,0 +1,92 @@ +/** + * + * \file cpx.cpp + * \brief read and write DIO + * + * \author Manuel Traut + * \version 2006-10-06 + * + */ + +#include "cpx.h" + +// Constructor: calls init + +CPX::CPX(){ + init(); + std::cout<<"\n\n init ok\n\n"; +} + +// init: Memory Mapping, Setup Signal + +int CPX::init(){ + + int fd_out = open(CPX_Input, O_RDWR | O_SYNC); + if (fd_out == -1){ + std::cerr<<"PBCIO: open failed"<