aboutsummaryrefslogtreecommitdiff
path: root/src/drivers/drv_gpio.h
diff options
context:
space:
mode:
authorpx4dev <px4@purgatory.org>2013-07-07 17:53:55 -0700
committerpx4dev <px4@purgatory.org>2013-07-07 17:53:55 -0700
commitb4029dd824cec7a0b53c62e960f80d90ddc6e13c (patch)
tree2bae71f23af17bb0d9de26a914c859ec9af1e010 /src/drivers/drv_gpio.h
parent43f1843cc750fcef07122feaeca07863ed28c036 (diff)
downloadpx4-firmware-b4029dd824cec7a0b53c62e960f80d90ddc6e13c.tar.gz
px4-firmware-b4029dd824cec7a0b53c62e960f80d90ddc6e13c.tar.bz2
px4-firmware-b4029dd824cec7a0b53c62e960f80d90ddc6e13c.zip
Pull v2 pieces up to build with the merge
Diffstat (limited to 'src/drivers/drv_gpio.h')
-rw-r--r--src/drivers/drv_gpio.h40
1 files changed, 9 insertions, 31 deletions
diff --git a/src/drivers/drv_gpio.h b/src/drivers/drv_gpio.h
index a4c59d218..faeb9cf60 100644
--- a/src/drivers/drv_gpio.h
+++ b/src/drivers/drv_gpio.h
@@ -42,7 +42,7 @@
#include <sys/ioctl.h>
-#ifdef CONFIG_ARCH_BOARD_PX4FMU
+#ifdef CONFIG_ARCH_BOARD_PX4FMU_V1
/*
* PX4FMU GPIO numbers.
*
@@ -67,7 +67,7 @@
#endif
-#ifdef CONFIG_ARCH_BOARD_PX4FMUV2
+#ifdef CONFIG_ARCH_BOARD_PX4FMU_V2
/*
* PX4FMUv2 GPIO numbers.
*
@@ -93,36 +93,14 @@
#endif
-#ifdef CONFIG_ARCH_BOARD_PX4IO
-/*
- * PX4IO GPIO numbers.
- *
- * XXX note that these are here for reference/future use; currently
- * there is no good way to wire these up without a common STM32 GPIO
- * driver, which isn't implemented yet.
- */
-/* outputs */
-# define GPIO_ACC1_POWER (1<<0) /**< accessory power 1 */
-# define GPIO_ACC2_POWER (1<<1) /**< accessory power 2 */
-# define GPIO_SERVO_POWER (1<<2) /**< servo power */
-# define GPIO_RELAY1 (1<<3) /**< relay 1 */
-# define GPIO_RELAY2 (1<<4) /**< relay 2 */
-# define GPIO_LED_BLUE (1<<5) /**< blue LED */
-# define GPIO_LED_AMBER (1<<6) /**< amber/red LED */
-# define GPIO_LED_SAFETY (1<<7) /**< safety LED */
-
-/* inputs */
-# define GPIO_ACC_OVERCURRENT (1<<8) /**< accessory 1/2 overcurrent detect */
-# define GPIO_SERVO_OVERCURRENT (1<<9) /**< servo overcurrent detect */
-# define GPIO_SAFETY_BUTTON (1<<10) /**< safety button pressed */
-
-/**
- * Default GPIO device - other devices may also support this protocol if
- * they also export GPIO-like things. This is always the GPIOs on the
- * main board.
- */
-# define GPIO_DEVICE_PATH "/dev/px4io"
+#ifdef CONFIG_ARCH_BOARD_PX4IO_V1
+/* no GPIO driver on the PX4IOv1 board */
+# define GPIO_DEVICE_PATH "/nonexistent"
+#endif
+#ifdef CONFIG_ARCH_BOARD_PX4IO_V2
+/* no GPIO driver on the PX4IOv2 board */
+# define GPIO_DEVICE_PATH "/nonexistent"
#endif
#ifndef GPIO_DEVICE_PATH