From 3ee9b441c62dc0ab86816e12d3af2cb9956221d3 Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Thu, 16 Apr 2015 22:50:24 +0200 Subject: Add STM32F4 discovery config. --- src/systemcmds/tests/test_gpio.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/systemcmds/tests') diff --git a/src/systemcmds/tests/test_gpio.c b/src/systemcmds/tests/test_gpio.c index 62a873270..82c122550 100644 --- a/src/systemcmds/tests/test_gpio.c +++ b/src/systemcmds/tests/test_gpio.c @@ -89,10 +89,11 @@ int test_gpio(int argc, char *argv[]) { - int fd; int ret = 0; - fd = open(PX4IO_DEVICE_PATH, 0); +#ifdef PX4IO_DEVICE_PATH + + int fd = open(PX4IO_DEVICE_PATH, 0); if (fd < 0) { printf("GPIO: open fail\n"); @@ -109,7 +110,11 @@ int test_gpio(int argc, char *argv[]) /* Go back to default */ ioctl(fd, GPIO_RESET, ~0); + close(fd); printf("\t GPIO test successful.\n"); +#endif + + return ret; } -- cgit v1.2.3