AP_HAL_ChibiOS: enforce HAL_GPIO_LED_OFF is not(HAL_GPIO_LED_ON)

the current "flexibility" allows for ON/OFF to be the same value.

Many hwdef files where only setting one of these, leaving the other at teh default, too....
This commit is contained in:
Peter Barker 2024-03-22 13:22:21 +11:00 committed by Peter Barker
parent f70a1927f5
commit 99dd85d51c
1 changed files with 4 additions and 2 deletions

View File

@ -22,10 +22,12 @@
#define HAL_GPIO_LED_ON 0
#endif
#ifndef HAL_GPIO_LED_OFF
#define HAL_GPIO_LED_OFF 1
#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)
/*
pin types for alternative configuration
*/