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

View File

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