HAL_PX4: allow for different LED pins

and fixed build
This commit is contained in:
Andrew Tridgell 2018-02-12 12:48:31 +11:00
parent 17b3607aa8
commit fba962f7ff
1 changed files with 14 additions and 6 deletions

View File

@ -16,12 +16,20 @@
*/
#define PX4_GPIO_FMU_SERVO_PIN(n) (n+50)
#if CONFIG_HAL_BOARD == HAL_BOARD_PX4
# define HAL_GPIO_A_LED_PIN 27
# define HAL_GPIO_B_LED_PIN 26
# define HAL_GPIO_C_LED_PIN 25
# define HAL_GPIO_LED_ON LOW
# define HAL_GPIO_LED_OFF HIGH
#ifndef HAL_GPIO_A_LED_PIN
#define HAL_GPIO_A_LED_PIN 27
#endif
#ifndef HAL_GPIO_B_LED_PIN
#define HAL_GPIO_B_LED_PIN 26
#endif
#ifndef HAL_GPIO_C_LED_PIN
#define HAL_GPIO_C_LED_PIN 25
#endif
#ifndef HAL_GPIO_LED_ON
#define HAL_GPIO_LED_ON 0
#endif
#ifndef HAL_GPIO_LED_OFF
#define HAL_GPIO_LED_OFF 1
#endif
class PX4::PX4GPIO : public AP_HAL::GPIO {