Rename LED_PIN to LED_POWER, move handling out of main to dedicated module (#9512)

* Rename LED_PIN to LED_POWER, move handling out of main to dedicated module

* Misc

* Remove errant endif
This commit is contained in:
Jonathan Bennett
2026-02-05 05:41:00 -06:00
committed by GitHub
co-authored by GitHub
parent 94b7149958
commit 2361776992
107 changed files with 207 additions and 311 deletions
@@ -52,7 +52,6 @@ extern "C" {
// LED
#define LED_RED 33
#define LED_POWER LED_RED
#define LED_CHARGE LED_POWER // Signals the Status LED Module to handle this LED
#define LED_GREEN 35
#define LED_NOTIFICATION LED_GREEN
#define LED_BLUE 37
@@ -32,9 +32,6 @@ const uint32_t g_ADigitalPinMap[] = {
void initVariant()
{
pinMode(LED_CHARGE, OUTPUT);
ledOff(LED_CHARGE);
pinMode(LED_PAIRING, OUTPUT);
ledOff(LED_PAIRING);
@@ -41,7 +41,7 @@ extern "C" {
// LEDs
#define LED_BLUE -1
#define LED_CHARGE (12)
#define LED_POWER (12)
#define LED_PAIRING (7)
#define LED_NOTIFICATION LED_PAIRING
@@ -32,9 +32,6 @@ const uint32_t g_ADigitalPinMap[] = {
void initVariant()
{
pinMode(LED_PIN, OUTPUT);
digitalWrite(LED_PIN, LOW);
pinMode(PIN_3V3_EN, OUTPUT);
digitalWrite(PIN_3V3_EN, HIGH);
}
+1 -1
View File
@@ -50,7 +50,7 @@ extern "C" {
#define PIN_LED1 (32 + 7) // P1.07 Blue D2
#define LED_PIN PIN_LED1
#define LED_POWER PIN_LED1
#define LED_BLUE -1
#define LED_STATE_ON 1 // State when LED is lit
@@ -32,9 +32,6 @@ const uint32_t g_ADigitalPinMap[] = {
void initVariant()
{
pinMode(LED_PIN, OUTPUT);
digitalWrite(LED_PIN, LOW);
pinMode(PIN_3V3_EN, OUTPUT);
digitalWrite(PIN_3V3_EN, HIGH);
}
@@ -50,7 +50,7 @@ extern "C" {
#define PIN_LED1 (32 + 7) // P1.07 Blue D2
#define LED_PIN PIN_LED1
#define LED_POWER PIN_LED1
#define LED_BLUE -1
#define LED_STATE_ON 1 // State when LED is lit
+1 -1
View File
@@ -50,7 +50,7 @@ extern "C" {
#define PIN_LED1 (-1)
#define LED_PIN PIN_LED1
#define LED_POWER PIN_LED1
#define LED_BLUE -1
#define LED_STATE_ON 1 // State when LED is lit
@@ -101,7 +101,6 @@ void initVariant()
pinMode(PIN_LED2, OUTPUT);
digitalWrite(PIN_LED2, LOW);
pinMode(PIN_LED2, OUTPUT);
// digitalWrite(LED_PIN, LOW);
pinMode(GPS_EN, OUTPUT);
digitalWrite(GPS_EN, HIGH);
@@ -65,7 +65,7 @@ static const uint8_t A5 = PIN_A5;
#define LED_GREEN (13)
#define LED_BLUE (12)
#define PIN_LED1 LED_GREEN // PIN_LED1 is used in src/platform/nrf52/architecture.h to define LED_PIN
#define PIN_LED1 LED_GREEN // PIN_LED1 is used in src/platform/nrf52/architecture.h to define LED_POWER
#define PIN_LED2 LED_BLUE
#define PIN_LED3 LED_RED
@@ -32,10 +32,6 @@ const uint32_t g_ADigitalPinMap[] = {
void initVariant()
{
// LED1 & LED2
pinMode(LED_PIN, OUTPUT);
digitalWrite(LED_PIN, LOW);
pinMode(PIN_3V3_EN, OUTPUT);
digitalWrite(PIN_3V3_EN, HIGH);
+1 -1
View File
@@ -47,7 +47,7 @@ extern "C" {
#define PIN_3V3_ACC_EN (32 + 7) // P1.7, Power to Acc
#define PIN_LED1 (0 + 24) // P0.24
#define LED_PIN PIN_LED1
#define LED_POWER PIN_LED1
#define LED_BLUE -1 // Actually green
#define LED_STATE_ON 1 // State when LED is lit
@@ -32,10 +32,6 @@ const uint32_t g_ADigitalPinMap[] = {
void initVariant()
{
// LED1 & LED2
pinMode(LED_PIN, OUTPUT);
digitalWrite(LED_PIN, LOW);
pinMode(PIN_3V3_EN, OUTPUT);
digitalWrite(PIN_3V3_EN, HIGH);
+1 -1
View File
@@ -47,7 +47,7 @@ extern "C" {
#define PIN_3V3_ACC_EN (32 + 7) // P1.7, Power to Acc
#define PIN_LED1 (0 + 24) // P0.24
#define LED_PIN PIN_LED1
#define LED_POWER PIN_LED1
#define LED_BLUE -1 // Actually green
#define LED_STATE_ON 1 // State when LED is lit