From b7fe7797133b1bf4b5957903852ebc85ec19e286 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Fri, 29 Mar 2024 12:48:08 +1100 Subject: [PATCH] AP_HAL: move GPIO ON/off defaults from AP_HAL_ChibiOS to AP_HAL these can be reused across different vehicles --- libraries/AP_HAL/AP_HAL_Boards.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libraries/AP_HAL/AP_HAL_Boards.h b/libraries/AP_HAL/AP_HAL_Boards.h index b9cb51bbf9..5ba862d7ef 100644 --- a/libraries/AP_HAL/AP_HAL_Boards.h +++ b/libraries/AP_HAL/AP_HAL_Boards.h @@ -363,3 +363,13 @@ #ifndef HAL_ENABLE_SENDING_STATS #define HAL_ENABLE_SENDING_STATS BOARD_FLASH_SIZE >= 256 #endif + +#ifndef HAL_GPIO_LED_ON +#define HAL_GPIO_LED_ON 0 +#endif + +#ifdef HAL_GPIO_LED_OFF +#error "HAL_GPIO_LED_OFF must not be defined, it is implicitly !HAL_GPIO_LED_ON" +#endif + +#define HAL_GPIO_LED_OFF (!HAL_GPIO_LED_ON)