Remove LED_INVERTED, see below for why ;-) (#4382)

While working on #4378 I noticed a funny problem: the blinking system
LED was on during deep-sleep.  Initially I thought it was some weird
sleep hw config thing but it turns out it was easier but more pervasive.

We had two different preprocessor symbols which both meant approximately the same
thing LED_INVERTED and LED_STATE_ON (though their polarity was opposite).
Some variant files were setting one, others were setting the other, and others were
setting both. heh.

In the case of the board I was testing (seeed tracker wio 1100) it was only setting one
and the default behavior for the other (for all boards) was incorrect.  So I did a grep
and it seems like LED_STATE_ON was used more often, so I kept that one and removed
LED_INVERTED everywhere.
This commit is contained in:
geeksville
2024-08-05 04:02:32 -07:00
committed by GitHub
parent 40d6b99911
commit 1a38c4e51d
15 changed files with 24 additions and 28 deletions

View File

@@ -75,16 +75,16 @@
#ifdef ARDUINO_NRF52840_PCA10056
// This board uses 0 to be mean LED on
#undef LED_INVERTED
#define LED_INVERTED 1
#undef LED_STATE_ON
#define LED_STATE_ON 0 // State when LED is lit
#endif
#ifdef _SEEED_XIAO_NRF52840_SENSE_H_
// This board uses 0 to be mean LED on
#undef LED_INVERTED
#define LED_INVERTED 1
#undef LED_STATE_ON
#define LED_STATE_ON 0 // State when LED is lit
#endif
@@ -116,4 +116,4 @@
#if !defined(PIN_SERIAL_RX) && !defined(NRF52840_XXAA)
// No serial ports on this board - ONLY use segger in memory console
#define USE_SEGGER
#endif
#endif