mirror of
https://github.com/meshtastic/firmware.git
synced 2026-01-29 05:01:54 +00:00
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:
@@ -101,7 +101,7 @@
|
||||
|
||||
// Status
|
||||
#define LED_PIN 1
|
||||
#define LED_INVERTED 0
|
||||
#define LED_STATE_ON 1 // State when LED is lit
|
||||
// External notification
|
||||
// FIXME: Check if EXT_NOTIFY_OUT actualy has any effect and removes the need for setting the external notication pin in the
|
||||
// app/preferences
|
||||
|
||||
@@ -56,7 +56,6 @@ extern "C" {
|
||||
#define LED_CONN PIN_LED3
|
||||
|
||||
#define LED_STATE_ON 0 // State when LED is lit
|
||||
#define LED_INVERTED 1
|
||||
|
||||
/*
|
||||
* Buttons
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
// LED pin on HT-DEV-ESP_V2 and HT-DEV-ESP_V3
|
||||
// https://resource.heltec.cn/download/HT-CT62/HT-CT62_Reference_Design.pdf
|
||||
// https://resource.heltec.cn/download/HT-DEV-ESP/HT-DEV-ESP_V3_Sch.pdf
|
||||
#define LED_PIN 2 // LED
|
||||
#define LED_INVERTED 0
|
||||
#define LED_PIN 2 // LED
|
||||
#define LED_STATE_ON 1 // State when LED is lit
|
||||
|
||||
#define HAS_SCREEN 0
|
||||
#define HAS_GPS 0
|
||||
@@ -26,4 +26,4 @@
|
||||
#define SX126X_BUSY LORA_BUSY
|
||||
#define SX126X_RESET LORA_RESET
|
||||
#define SX126X_DIO2_AS_RF_SWITCH
|
||||
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
|
||||
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
|
||||
@@ -80,7 +80,6 @@ extern "C" {
|
||||
#define LED_CONN PIN_GREEN
|
||||
|
||||
#define LED_STATE_ON 0 // State when LED is lit
|
||||
#define LED_INVERTED 1
|
||||
|
||||
/*
|
||||
* Buttons
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
// #define GPS_TX_PIN 32 (now used by SX1262 BUSY as GPS works with just RX)
|
||||
|
||||
// Green LED
|
||||
#define LED_INVERTED 0
|
||||
#define LED_STATE_ON 1 // State when LED is lit
|
||||
#define LED_PIN 10
|
||||
|
||||
#include "pcf8563.h"
|
||||
@@ -106,4 +106,4 @@
|
||||
// GND
|
||||
// https://github.com/m5stack/M5Core-Ink/blob/master/examples/Basics/FactoryTest/FactoryTest.ino#L58
|
||||
#define ADC_MULTIPLIER 5
|
||||
// https://embeddedexplorer.com/esp32-adc-esp-idf-tutorial/
|
||||
// https://embeddedexplorer.com/esp32-adc-esp-idf-tutorial/
|
||||
@@ -54,7 +54,6 @@ extern "C" {
|
||||
#define LED_CONN PIN_GREEN
|
||||
|
||||
#define LED_STATE_ON 0 // State when LED is lit
|
||||
// #define LED_INVERTED 1
|
||||
|
||||
/*
|
||||
* Buttons
|
||||
|
||||
@@ -56,7 +56,6 @@ extern "C" {
|
||||
#define LED_CONN PIN_GREEN
|
||||
|
||||
#define LED_STATE_ON 0 // State when LED is lit
|
||||
#define LED_INVERTED 1
|
||||
|
||||
/*
|
||||
* Buttons
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
// anywhere.
|
||||
// #define EXT_NOTIFY_OUT 13 // Default pin to use for Ext Notify Module.
|
||||
|
||||
#define LED_INVERTED 1
|
||||
#define LED_STATE_ON 0 // State when LED is lit
|
||||
|
||||
// TTGO uses a common pinout for their SX1262 vs RF95 modules - both can be enabled and we will probe at runtime for RF95 and if
|
||||
// not found then probe for SX1262
|
||||
@@ -66,4 +66,4 @@
|
||||
// has 32768 Hz crystal
|
||||
#define HAS_32768HZ
|
||||
|
||||
#define USE_SH1106
|
||||
#define USE_SH1106
|
||||
@@ -8,8 +8,8 @@
|
||||
// anywhere.
|
||||
#define EXT_NOTIFY_OUT 13 // Default pin to use for Ext Notify Module.
|
||||
|
||||
#define LED_INVERTED 1
|
||||
#define LED_PIN 4 // Newer tbeams (1.1) have an extra led on GPIO4
|
||||
#define LED_STATE_ON 0 // State when LED is lit
|
||||
#define LED_PIN 4 // Newer tbeams (1.1) have an extra led on GPIO4
|
||||
|
||||
// TTGO uses a common pinout for their SX1262 vs RF95 modules - both can be enabled and we will probe at runtime for RF95 and if
|
||||
// not found then probe for SX1262
|
||||
|
||||
@@ -51,8 +51,8 @@
|
||||
// #define HAS_SDCARD 1 // causes hang if defined
|
||||
#define SDCARD_CS 43
|
||||
|
||||
#define LED_PIN 13 // the red part of the RGB LED
|
||||
#define LED_INVERTED 1
|
||||
#define LED_PIN 13 // the red part of the RGB LED
|
||||
#define LED_STATE_ON 0 // State when LED is lit
|
||||
|
||||
#define BUTTON_PIN 21 // Button 3 - square - top button in landscape mode
|
||||
#define BUTTON_NEED_PULLUP // we do need a helping hand up
|
||||
|
||||
Reference in New Issue
Block a user