HAL_PX4: fixed build on FMUv1

This commit is contained in:
Andrew Tridgell 2013-07-28 18:10:52 +10:00
parent 3a6b7df23c
commit 0f677e3a10
1 changed files with 1 additions and 1 deletions

View File

@ -47,11 +47,11 @@ void PX4GPIO::init()
hal.scheduler->panic("Unable to open /dev/tone_alarm");
}
#ifdef CONFIG_ARCH_BOARD_PX4IO_V1
_gpio_fd = open(PX4FMU_DEVICE_PATH, O_RDWR);
if (_gpio_fd == -1) {
hal.scheduler->panic("Unable to open GPIO");
}
#ifdef CONFIG_ARCH_BOARD_PX4IO_V1
if (ioctl(_gpio_fd, GPIO_CLEAR, GPIO_EXT_1) != 0) {
hal.console->printf("GPIO: Unable to setup GPIO_1\n");
}