From 1650c22d9f6bcd791a17dc98fb8d9665e8faebcb Mon Sep 17 00:00:00 2001 From: Manuel Traut Date: Sun, 3 Jun 2012 16:06:44 +0200 Subject: add generic_gpio example/test - little test which adds a single testpin to the manager - should be extended to register gpios defined in a config file - doesn't work at the moment Signed-off-by: Manuel Traut --- generic_gpio/generic_gpio.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 generic_gpio/generic_gpio.cpp (limited to 'generic_gpio/generic_gpio.cpp') diff --git a/generic_gpio/generic_gpio.cpp b/generic_gpio/generic_gpio.cpp new file mode 100644 index 0000000..3287578 --- /dev/null +++ b/generic_gpio/generic_gpio.cpp @@ -0,0 +1,25 @@ +#include +#include + +int main (int argc, char **argv) +{ + int ret = 0; + Distrio_Digital_i *digital; + + if (init_corba (argc, argv)) + return -EINVAL; + + digital = new Distrio_Digital_i (); + + if (register_digital ("pin huhu", digital)) { + ret = -EINVAL; + goto out; + } + + if (run_orb ()) + ret = -EINVAL; + +out: + free (digital); + return ret; +} -- cgit v1.2.3