24 #include <sys/types.h>
26 #include "libpruio/pruio.h"
27 #include "libpruio/pruio_pins.h"
43 struct timeval timeout;
47 FD_SET(STDIN_FILENO, &set);
51 timeout.tv_usec = mseconds * 1000;
53 return TEMP_FAILURE_RETRY(select(FD_SETSIZE,
59 int main(
int argc,
char **argv)
64 printf(
"initialisation failed (%s)\n",
io->Errr);
break;}
67 printf(
"config failed (%s)\n",
io->Errr);
break;}
69 struct termios oldt, newt;
70 tcgetattr( STDIN_FILENO, &oldt );
72 newt.c_lflag &= ~( ICANON | ECHO );
75 tcsetattr(STDIN_FILENO, TCSANOW, &newt);
81 tcsetattr(STDIN_FILENO, TCSANOW, &oldt);
VAR io
create new driver UDT
char * pruio_config(pruIo *Io, uint32 Samp, uint32 Mask, uint32 Tmr, uint16 Mds)
Wrapper function for PruIo::config().
uint32 pruio_gpio_Value(pruIo *Io, uint8 Ball)
Wrapper function for GpioUdt::Value().
pruIo * pruio_new(uint16 Act, uint8 Av, uint32 OpD, uint8 SaD)
Wrapper function for the constructor PruIo::PruIo().
void pruio_destroy(pruIo *Io)
Wrapper function for the destructor PruIo::~PruIo().
@ PRUIO_DEF_ACTIVE
Activate all subsystems.
const ANY_PTR NULL
The NULL pointer.
Wrapper structure for PruIo.