diff options
author | px4dev <px4@purgatory.org> | 2013-04-06 19:20:08 -0700 |
---|---|---|
committer | px4dev <px4@purgatory.org> | 2013-04-06 19:20:08 -0700 |
commit | c355275669378c0d6f2e372afa370446525c66ee (patch) | |
tree | e2fb97441dbfda83f41f49df4929d0d048783e0e /apps/drivers/drv_gpio.h | |
parent | 706dcb6a53cc0163572541b856902616b30258ae (diff) | |
download | px4-firmware-c355275669378c0d6f2e372afa370446525c66ee.tar.gz px4-firmware-c355275669378c0d6f2e372afa370446525c66ee.tar.bz2 px4-firmware-c355275669378c0d6f2e372afa370446525c66ee.zip |
Make the 'fmu' command build for v2. Should be enough to get the FMU-side PWM outputs working, but untested.
Diffstat (limited to 'apps/drivers/drv_gpio.h')
-rw-r--r-- | apps/drivers/drv_gpio.h | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/apps/drivers/drv_gpio.h b/apps/drivers/drv_gpio.h index 2fa6d8b8e..d21fc5c33 100644 --- a/apps/drivers/drv_gpio.h +++ b/apps/drivers/drv_gpio.h @@ -42,11 +42,6 @@ #include <sys/ioctl.h> -#ifdef CONFIG_ARCH_BOARD_PX4FMUV2 -#warning No GPIOs on this board. -#define GPIO_DEVICE_PATH "/dev/null" -#endif - #ifdef CONFIG_ARCH_BOARD_PX4FMU /* * PX4FMU GPIO numbers. @@ -72,6 +67,28 @@ #endif +#ifdef CONFIG_ARCH_BOARD_PX4FMUV2 +/* + * PX4FMUv2 GPIO numbers. + * + * There are no alternate functions on this board. + */ +# define GPIO_SERVO_1 (1<<0) /**< servo 1 output */ +# define GPIO_SERVO_2 (1<<1) /**< servo 2 output */ +# define GPIO_SERVO_3 (1<<2) /**< servo 3 output */ +# define GPIO_SERVO_4 (1<<3) /**< servo 4 output */ +# define GPIO_SERVO_5 (1<<4) /**< servo 5 output */ +# define GPIO_SERVO_6 (1<<5) /**< servo 6 output */ + +/** + * 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/px4fmu" + +#endif + #ifdef CONFIG_ARCH_BOARD_PX4IO /* * PX4IO GPIO numbers. |