17 from __future__
import print_function
18 from libpruio
import *
24 io =
pruio_new(PRUIO_DEF_ACTIVE, 4, 0x98, 0)
28 if IO.Errr:
raise AssertionError(
"pruio_new failed (%s)" % IO.Errr)
30 raise AssertionError(
"GPIO configuration failed (%s)" % IO.Errr)
32 raise AssertionError(
"config failed (%s)" % IO.Errr)
34 print(
"Press <Crtl>-C to stop")
39 except KeyboardInterrupt:
43 raise AssertionError(
"GPIO re-configuration failed (%s)" % IO.Errr)
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().
char * pruio_gpio_config(pruIo *Io, uint8 Ball, uint8 Modus)
Wrapper function for GpioUdt::config().
void pruio_destroy(pruIo *Io)
Wrapper function for the destructor PruIo::~PruIo().