aboutsummaryrefslogtreecommitdiff
path: root/src/systemcmds/tests
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2015-04-16 22:50:24 +0200
committerLorenz Meier <lm@inf.ethz.ch>2015-04-16 22:51:08 +0200
commit3ee9b441c62dc0ab86816e12d3af2cb9956221d3 (patch)
treec8418434c97bb3900fb28a0b7212035f8922c8b8 /src/systemcmds/tests
parentbb9e5d0d4c719367a3645432fd3f544638f90418 (diff)
downloadpx4-firmware-3ee9b441c62dc0ab86816e12d3af2cb9956221d3.tar.gz
px4-firmware-3ee9b441c62dc0ab86816e12d3af2cb9956221d3.tar.bz2
px4-firmware-3ee9b441c62dc0ab86816e12d3af2cb9956221d3.zip
Add STM32F4 discovery config.
Diffstat (limited to 'src/systemcmds/tests')
-rw-r--r--src/systemcmds/tests/test_gpio.c9
1 files changed, 7 insertions, 2 deletions
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;
}