Module: xenomai-3
Branch: wip/drivers
Commit: 254fbdbc5340de89b732f4f599efe67d4a6ad191
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=254fbdbc5340de89b732f4f599efe67d4a6ad191

Author: Philippe Gerum <r...@xenomai.org>
Date:   Tue Jul 12 10:03:48 2016 +0200

testsuite/gpio: fix output value set with direction

---

 testsuite/gpiotest/gpiotest.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/testsuite/gpiotest/gpiotest.c b/testsuite/gpiotest/gpiotest.c
index c6620e1..a845ef5 100644
--- a/testsuite/gpiotest/gpiotest.c
+++ b/testsuite/gpiotest/gpiotest.c
@@ -202,7 +202,8 @@ static int run_write_value(struct smokey_test *t, int argc, 
char *const argv[])
                return ret;
        }
 
-       if (!__T(ret, ioctl(fd, GPIO_RTIOC_DIR_OUT)))
+       value = 1;
+       if (!__T(ret, ioctl(fd, GPIO_RTIOC_DIR_OUT, &value)))
                return ret;
        
        ret = write(fd, &value, sizeof(value));


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
https://xenomai.org/mailman/listinfo/xenomai-git

Reply via email to