diff options
| author | Manuel Traut <manut@mecka.net> | 2012-06-03 16:06:44 +0200 |
|---|---|---|
| committer | Manuel Traut <manut@mecka.net> | 2012-06-03 16:06:44 +0200 |
| commit | 1650c22d9f6bcd791a17dc98fb8d9665e8faebcb (patch) | |
| tree | b6c7964be7b5ee381c03e4cbe27ebb897a1a2337 /generic_gpio/generic_gpio.cpp | |
| parent | b0241e873c1c0c2cb5e4ad272b8ae2ce79bd922f (diff) | |
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 <manut@mecka.net>
Diffstat (limited to 'generic_gpio/generic_gpio.cpp')
| -rw-r--r-- | generic_gpio/generic_gpio.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
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 <distrio_helper.h> +#include <distrio_ioI.h> + +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; +} |
