Browse Source

HAL_PX4: fixed build on FMUv1

mission-4.1.18
Andrew Tridgell 12 years ago
parent
commit
0f677e3a10
  1. 2
      libraries/AP_HAL_PX4/GPIO.cpp

2
libraries/AP_HAL_PX4/GPIO.cpp

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

Loading…
Cancel
Save