aboutsummaryrefslogtreecommitdiff
path: root/src/modules/px4iofirmware/px4io.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/modules/px4iofirmware/px4io.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/modules/px4iofirmware/px4io.h')
-rw-r--r--src/modules/px4iofirmware/px4io.h30
1 files changed, 16 insertions, 14 deletions
diff --git a/src/modules/px4iofirmware/px4io.h b/src/modules/px4iofirmware/px4io.h
index b32782285..ccf175e45 100644
--- a/src/modules/px4iofirmware/px4io.h
+++ b/src/modules/px4iofirmware/px4io.h
@@ -42,10 +42,10 @@
#include <stdbool.h>
#include <stdint.h>
-#ifdef CONFIG_ARCH_BOARD_PX4IO
+#ifdef CONFIG_ARCH_BOARD_PX4IO_V1
# include <drivers/boards/px4io/px4io_internal.h>
#endif
-#ifdef CONFIG_ARCH_BOARD_PX4IOV2
+#ifdef CONFIG_ARCH_BOARD_PX4IO_V2
# include <drivers/boards/px4iov2/px4iov2_internal.h>
#endif
@@ -129,18 +129,7 @@ extern struct sys_state_s system_state;
#define LED_AMBER(_s) stm32_gpiowrite(GPIO_LED2, !(_s))
#define LED_SAFETY(_s) stm32_gpiowrite(GPIO_LED3, !(_s))
-#ifdef CONFIG_ARCH_BOARD_PX4IOV2
-
-# define PX4IO_RELAY_CHANNELS 0
-# define POWER_SPEKTRUM(_s) stm32_gpiowrite(GPIO_SPEKTRUM_PWR_EN, (_s))
-
-# define VDD_SERVO_FAULT (!stm32_gpioread(GPIO_SERVO_FAULT_DETECT))
-
-# define PX4IO_ADC_CHANNEL_COUNT 2
-# define ADC_VSERVO 4
-# define ADC_RSSI 5
-
-#else /* CONFIG_ARCH_BOARD_PX4IOV1 */
+#ifdef CONFIG_ARCH_BOARD_PX4IO_V1
# define PX4IO_RELAY_CHANNELS 4
# define POWER_SERVO(_s) stm32_gpiowrite(GPIO_SERVO_PWR_EN, (_s))
@@ -158,6 +147,19 @@ extern struct sys_state_s system_state;
#endif
+#ifdef CONFIG_ARCH_BOARD_PX4IO_V2
+
+# define PX4IO_RELAY_CHANNELS 0
+# define POWER_SPEKTRUM(_s) stm32_gpiowrite(GPIO_SPEKTRUM_PWR_EN, (_s))
+
+# define VDD_SERVO_FAULT (!stm32_gpioread(GPIO_SERVO_FAULT_DETECT))
+
+# define PX4IO_ADC_CHANNEL_COUNT 2
+# define ADC_VSERVO 4
+# define ADC_RSSI 5
+
+#endif
+
#define BUTTON_SAFETY stm32_gpioread(GPIO_BTN_SAFETY)
/*