Skip to content

Commit

Permalink
AP_HAL: move GPIO ON/off defaults from AP_HAL_ChibiOS to AP_HAL
Browse files Browse the repository at this point in the history
these can be reused across different vehicles
  • Loading branch information
peterbarker committed Apr 3, 2024
1 parent a65e06e commit b7fe779
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions libraries/AP_HAL/AP_HAL_Boards.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit b7fe779

Please sign in to comment.