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
@@ -14,7 +14,7 @@
#define LORA_CS 5
#define RF95_FAN_EN 17
// #define LED_PIN 16 // This is a LED_WS2812 not a standard LED
// This is a LED_WS2812 not a standard LED
#define HAS_NEOPIXEL // Enable the use of neopixels
#define NEOPIXEL_COUNT 1 // How many neopixels are connected
#define NEOPIXEL_DATA 16 // gpio pin used to send data to the neopixels
+1 -1
View File
@@ -20,7 +20,7 @@
#define LORA_DIO2
#define LORA_DIO3
#define LED_PIN 16 // green - blue is at 17
#define LED_POWER 16 // green - blue is at 17
#define BUTTON_PIN 25
#define BUTTON_NEED_PULLUP
-2
View File
@@ -23,8 +23,6 @@
#define SX126X_TXEN RADIOLIB_NC
#define SX126X_RXEN RADIOLIB_NC
// Status
// #define LED_PIN 1
// 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
@@ -21,8 +21,8 @@
#define BUTTON_PIN 15 // Right side button - if not available, set device.button_gpio to 0 from Meshtastic client
// LEDs
#define LED_PIN 13 // Tx LED
#define USER_LED 2 // Rx LED
#define LED_POWER 13 // Tx LED
#define USER_LED 2 // Rx LED
// Buzzer
#define PIN_BUZZER 33
+1 -1
View File
@@ -15,7 +15,7 @@
#define ADC_MULTIPLIER 1.85 // (R1 = 470k, R2 = 680k)
#define EXT_PWR_DETECT 4 // Pin to detect connected external power source for LILYGO® TTGO T-Energy T18 and other DIY boards
#define EXT_NOTIFY_OUT 12 // Overridden default pin to use for Ext Notify Module (#975).
#define LED_PIN 2 // add status LED (compatible with core-pcb and DIY targets)
#define LED_POWER 2 // add status LED (compatible with core-pcb and DIY targets)
// Radio
#define USE_SX1262 // E22-900M30S uses SX1262
+1 -1
View File
@@ -15,7 +15,7 @@
#define ADC_MULTIPLIER 1.85 // (R1 = 470k, R2 = 680k)
#define EXT_PWR_DETECT 4 // Pin to detect connected external power source for LILYGO® TTGO T-Energy T18 and other DIY boards
#define EXT_NOTIFY_OUT 12 // Overridden default pin to use for Ext Notify Module (#975).
#define LED_PIN 2 // add status LED (compatible with core-pcb and DIY targets)
#define LED_POWER 2 // add status LED (compatible with core-pcb and DIY targets)
#define LORA_DIO0 26 // a No connect on the SX1262/SX1268 module
#define LORA_RESET 23 // RST for SX1276, and for SX1262/SX1268
@@ -3,7 +3,7 @@
// HACKBOX LoRa IO Kit
// Uses a ESP-32-WROOM and a RA-01SH (SX1262) LoRa Board
#define LED_PIN 2 // LED
#define LED_POWER 2 // LED
#define LED_STATE_ON 1 // State when LED is lit
#define HAS_SCREEN 0
+1 -1
View File
@@ -12,7 +12,7 @@
#define RESET_OLED 16 // If defined, this pin will be used to reset the display controller
#define LED_PIN 25 // If defined we will blink this LED
#define LED_POWER 25 // If defined we will blink this LED
#define BUTTON_PIN 0 // If defined, this will be used for user button presses
#define USE_RF95
+1 -1
View File
@@ -18,7 +18,7 @@
#define RESET_OLED 16 // If defined, this pin will be used to reset the display controller
#define VEXT_ENABLE 21 // active low, powers the oled display and the lora antenna boost
#define LED_PIN 25 // If defined we will blink this LED
#define LED_POWER 25 // If defined we will blink this LED
#define BUTTON_PIN 0 // If defined, this will be used for user button presses
#define USE_RF95
+1 -1
View File
@@ -13,7 +13,7 @@
#define RESET_OLED 16 // If defined, this pin will be used to reset the display controller
#define VEXT_ENABLE 21 // active low, powers the oled display and the lora antenna boost
#define LED_PIN 25 // If defined we will blink this LED
#define LED_POWER 25 // If defined we will blink this LED
#define BUTTON_PIN 0 // If defined, this will be used for user button presses
#define USE_RF95
@@ -15,7 +15,7 @@
#undef GPS_TX_PIN
// Green / Lora = PIN 22 / GPIO2, Yellow / Wifi = PIN 23 / GPIO0, Blue / BLE = PIN 25 / GPIO16
#define LED_PIN 22
#define LED_POWER 22
#define WIFI_LED 23
#define BLE_LED 25
+1 -1
View File
@@ -1,7 +1,7 @@
#define I2C_SCL SCL
#define I2C_SDA SDA
#define LED_PIN LED
#define LED_POWER LED
// active low, powers the Battery reader, but no lora antenna boost (?)
// #define VEXT_ENABLE Vext
+1 -1
View File
@@ -11,7 +11,7 @@
// Green LED
#define LED_STATE_ON 1 // State when LED is lit
#define LED_PIN 10
#define LED_POWER 10
// PCF8563 RTC Module
#define PCF8563_RTC 0x51
@@ -37,7 +37,7 @@
/*
LED PIN setup.
*/
#define LED_PIN 15
#define LED_POWER 15
/*
Five way button when using ADC.
+1 -1
View File
@@ -43,7 +43,7 @@ static const uint8_t SCK = 33;
#undef GPS_TX_PIN
#define GPS_TX_PIN (TX1)
#define LED_PIN LED_BLUE
#define LED_POWER LED_BLUE
#define PIN_VBAT WB_A0
#define BATTERY_PIN PIN_VBAT
+2 -2
View File
@@ -9,7 +9,7 @@
#define EXT_NOTIFY_OUT 13 // Default pin to use for Ext Notify Module.
#define LED_STATE_ON 0 // State when LED is lit
#define LED_PIN 4 // Newer tbeams (1.1) have an extra led on GPIO4
#define LED_POWER 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
@@ -49,7 +49,7 @@
#undef EXT_NOTIFY_OUT
#undef LED_STATE_ON
#undef LED_PIN
#undef LED_POWER
#define HAS_CST226SE 1
#define HAS_TOUCHSCREEN 1
+1 -1
View File
@@ -5,7 +5,7 @@
#define VEXT_ENABLE 21 // active low, powers the oled display and the lora antenna boost
#define VEXT_ON_VALUE LOW
#define LED_PIN 2 // If defined we will blink this LED
#define LED_POWER 2 // If defined we will blink this LED
#define BUTTON_PIN 0 // If defined, this will be used for user button presses
#define BUTTON_NEED_PULLUP
#define EXT_NOTIFY_OUT 13 // Default pin to use for Ext Notify Module.
+1 -1
View File
@@ -7,7 +7,7 @@
#define RESET_OLED 16 // If defined, this pin will be used to reset the display controller
#define VEXT_ENABLE 21 // active low, powers the oled display and the lora antenna boost
#define LED_PIN 25 // If defined we will blink this LED
#define LED_POWER 25 // If defined we will blink this LED
#define BUTTON_PIN 36
#define BUTTON_NEED_PULLUP
+1 -1
View File
@@ -5,7 +5,7 @@
#define I2C_SCL 22
#define VEXT_ENABLE 21 // active low, powers the oled display and the lora antenna boost
#define LED_PIN 25 // If defined we will blink this LED
#define LED_POWER 25 // If defined we will blink this LED
#define BUTTON_PIN \
0 // If defined, this will be used for user button presses, if your board doesn't have a physical switch, you can wire one
// between this pin and ground
+1 -1
View File
@@ -22,4 +22,4 @@ build_flags =
${env:tlora-v2-1-1_6.build_flags}
-DBUTTON_PIN=0
-DPIN_BUZZER=25
-DLED_PIN=-1
-DLED_POWER=-1
+3 -3
View File
@@ -8,10 +8,10 @@
#define I2C_SDA 21 // I2C pins for this board
#define I2C_SCL 22
#if defined(LED_PIN) && LED_PIN == -1
#undef LED_PIN
#if defined(LED_POWER) && LED_POWER == -1
#undef LED_POWER
#else
#define LED_PIN 25 // If defined we will blink this LED
#define LED_POWER 25 // If defined we will blink this LED
#endif
#define USE_RF95
+1 -1
View File
@@ -6,7 +6,7 @@
#define I2C_SDA 21 // I2C pins for this board
#define I2C_SCL 22
#define LED_PIN 25 // If defined we will blink this LED
#define LED_POWER 25 // If defined we will blink this LED
#define BUTTON_PIN 12 // If defined, this will be used for user button presses,
#define BUTTON_NEED_PULLUP
+1 -1
View File
@@ -8,7 +8,7 @@
#define GPS_RX_PIN 9
#define GPS_TX_PIN 10
#define LED_PIN 13 // 13 red, 2 blue, 15 red
#define LED_POWER 13 // 13 red, 2 blue, 15 red
#define BUTTON_PIN 0
#define BUTTON_NEED_PULLUP
+1 -1
View File
@@ -4,7 +4,7 @@
#define I2C_SCL SCL
#define BUTTON_PIN 9 // BOOT button
#define LED_PIN 30 // RGB LED
#define LED_POWER 30 // RGB LED
#define USE_RF95
#define LORA_SCK 4
@@ -3,7 +3,7 @@
// Hackerboxes LoRa ESP32-C3 OLED Kit
// Uses a ESP32-C3 OLED Board and a RA-01SH (SX1262) LoRa Board
#define LED_PIN 8 // LED
#define LED_POWER 8 // LED
#define LED_STATE_ON 1 // State when LED is lit
#define HAS_SCREEN 0
+1 -1
View File
@@ -3,7 +3,7 @@
// 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_POWER 2 // LED
#define LED_STATE_ON 1 // State when LED is lit
#define HAS_SCREEN 0
+1 -1
View File
@@ -1,7 +1,7 @@
#define I2C_SDA 8 // I2C pins for this board
#define I2C_SCL 9
#define LED_PIN 7 // If defined we will blink this LED
#define LED_POWER 7 // If defined we will blink this LED
#define LED_STATE_ON 0 // State when LED is lit
#define USE_SX1262
+1 -1
View File
@@ -1,7 +1,7 @@
#define I2C_SDA 34 // I2C pins for this board
#define I2C_SCL 36
#define LED_PIN 15 // If defined we will blink this LED
#define LED_POWER 15 // If defined we will blink this LED
#define HAS_NEOPIXEL // Enable the use of neopixels
#define NEOPIXEL_COUNT 3 // How many neopixels are connected
+1 -1
View File
@@ -1,7 +1,7 @@
// EByte EoRA-Hub
// Uses E80 (LR1121) LoRa module
#define LED_PIN 35
#define LED_POWER 35
// Button - user interface
#define BUTTON_PIN 0 // BOOT button
+1 -1
View File
@@ -1,5 +1,5 @@
// LED - status indication
#define LED_PIN 37
#define LED_POWER 37
// Button - user interface
#define BUTTON_PIN 0 // This is the BOOT button, and it has its own pull-up resistor
+1 -1
View File
@@ -100,7 +100,7 @@
*/
// Status
#define LED_PIN 1
#define LED_POWER 1
#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
@@ -1,5 +1,5 @@
// Status
#define LED_PIN 1
#define LED_POWER 1
#define PIN_BUTTON1 47 // 功能键
#define PIN_BUTTON2 4 // 电源键
@@ -8,5 +8,11 @@ void earlyInitVariant()
Wire.begin(48, 47);
io.pinMode(PCA_PIN_EINK_EN, OUTPUT);
io.pinMode(PCA_PIN_POWER_EN, OUTPUT);
io.pinMode(PCA_LED_POWER, OUTPUT);
io.pinMode(PCA_LED_USER, OUTPUT);
io.pinMode(PCA_LED_ENABLE, OUTPUT);
io.digitalWrite(PCA_PIN_POWER_EN, HIGH);
io.digitalWrite(PCA_LED_USER, LOW);
io.digitalWrite(PCA_LED_ENABLE, LOW);
}
@@ -8,8 +8,10 @@
// LED
// Both of these are on the GPIO expander
#define PCA_LED_USER 1 // the Blue LED
#define PCA_LED_POWER 3 // the Red LED? Seems to have hardware logic to blink when USB is plugged in.
#define PCA_LED_USER 1 // the Blue LED
#define PCA_LED_ENABLE 2 // the power supply to the LEDs, in an OR arrangement with VBUS power
#define PCA_LED_POWER 3 // the Red LED? Seems to have hardware logic to blink when USB is plugged in.
#define POWER_LED_HARDWARE_BLINKS_WHILE_CHARGING
// USB_CHECK
#define EXT_PWR_DETECT 12
@@ -11,7 +11,7 @@
#define I2C_SDA 12
#define I2C_SCL 14
#define LED_PIN 46
#define LED_POWER 46
#define LED_STATE_ON 0 // State when LED is litted
// #define BUTTON_PIN 15 // Pico OLED 1.3 User key 0 - removed User key 1 (17)
@@ -26,7 +26,7 @@
// #define GPS_RX_PIN 44
// #define GPS_TX_PIN 43
#define LED_PIN 41
#define LED_POWER 41
#define BUTTON_PIN 2
#define BUTTON_NEED_PULLUP
@@ -11,7 +11,7 @@
#define I2C_SDA 18 // 1 // I2C pins for this board
#define I2C_SCL 17 // 2
// #define LED_PIN 38 // This is a RGB LED not a standard LED
// #define LED_POWER 38 // This is a RGB LED not a standard LED
#define HAS_NEOPIXEL // Enable the use of neopixels
#define NEOPIXEL_COUNT 1 // How many neopixels are connected
#define NEOPIXEL_DATA 38 // gpio pin used to send data to the neopixels
@@ -11,7 +11,7 @@
#define I2C_SDA 18 // 1 // I2C pins for this board
#define I2C_SCL 17 // 2
// #define LED_PIN 38 // This is a RGB LED not a standard LED
// #define LED_POWER 38 // This is a RGB LED not a standard LED
#define HAS_NEOPIXEL // Enable the use of neopixels
#define NEOPIXEL_COUNT 1 // How many neopixels are connected
#define NEOPIXEL_DATA 38 // gpio pin used to send data to the neopixels
+1 -1
View File
@@ -6,7 +6,7 @@
#define I2C_SDA1 45
#define I2C_SCL1 46
#define LED_PIN 6
#define LED_POWER 6
#define LED_STATE_ON 1
#define BUTTON_PIN 0
@@ -1,5 +1,5 @@
#define LED_PIN 33
#define LED_PIN2 34
#define LED_POWER 33
#define LED_POWER2 34
#define EXT_PWR_DETECT 35
#define BUTTON_PIN 18
+1 -1
View File
@@ -1,4 +1,4 @@
#define LED_PIN LED
#define LED_POWER LED
#define USE_SSD1306 // Heltec_v3 has a SSD1306 display
+1 -1
View File
@@ -26,7 +26,7 @@ build_flags =
${heltec_v4_base.build_flags}
-D HELTEC_V4_OLED
-D USE_SSD1306 ; Heltec_v4 has an SSD1315 display (compatible with SSD1306 driver)
-D LED_PIN=35
-D LED_POWER=35
-D RESET_OLED=21
-D I2C_SDA=17
-D I2C_SCL=18
@@ -1,4 +1,4 @@
#define LED_PIN 45 // LED is not populated on earliest board variant
#define LED_POWER 45 // LED is not populated on earliest board variant
#define BUTTON_PIN 0
#define PIN_BUTTON2 21 // Second built-in button
#define ALT_BUTTON_PIN PIN_BUTTON2 // Send the up event
@@ -1,4 +1,4 @@
#define LED_PIN 45 // LED is not populated on earliest board variant
#define LED_POWER 45 // LED is not populated on earliest board variant
#define BUTTON_PIN 0
#define PIN_BUTTON2 21 // Second built-in button
#define ALT_BUTTON_PIN PIN_BUTTON2 // Send the up event
@@ -1,4 +1,4 @@
#define LED_PIN 18
#define LED_POWER 18
#define BUTTON_PIN 0
// I2C
@@ -1,4 +1,4 @@
#define LED_PIN 18
#define LED_POWER 18
#define BUTTON_PIN 0
// I2C
@@ -1,4 +1,4 @@
#define LED_PIN 18
#define LED_POWER 18
#define _VARIANT_HELTEC_WIRELESS_TRACKER
#define HELTEC_TRACKER_V1_X
@@ -1,4 +1,4 @@
#define LED_PIN 18
#define LED_POWER 18
#define HELTEC_TRACKER_V1_X
@@ -1,4 +1,4 @@
#define LED_PIN 18
#define LED_POWER 18
#define _VARIANT_HELTEC_WIRELESS_TRACKER
+1 -1
View File
@@ -1,7 +1,7 @@
#define I2C_SCL SCL
#define I2C_SDA SDA
#define LED_PIN LED
#define LED_POWER LED
#define VEXT_ENABLE Vext // active low, powers the oled display and the lora antenna boost
#define VEXT_ON_VALUE LOW
+1 -1
View File
@@ -13,7 +13,7 @@
#define ADC_CHANNEL ADC1_GPIO4_CHANNEL
// LED
#define LED_PIN 21
#define LED_POWER 21
// Button
#define BUTTON_PIN 0
+1 -1
View File
@@ -1,7 +1,7 @@
#define I2C_SDA 11 // I2C pins for this board
#define I2C_SCL 10
#define LED_PIN 1 // If defined we will blink this LED
#define LED_POWER 1 // If defined we will blink this LED
#define BUTTON_PIN 0 // If defined, this will be used for user button presses
#define BUTTON_NEED_PULLUP
+1 -1
View File
@@ -4,7 +4,7 @@
#define USE_SSD1306
#define DISPLAY_FLIP_SCREEN
#define LED_PIN 15 // If defined we will blink this LED
#define LED_POWER 15 // If defined we will blink this LED
#define HAS_NEOPIXEL // Enable the use of neopixels
#define NEOPIXEL_COUNT 3 // How many neopixels are connected
+1 -1
View File
@@ -24,7 +24,7 @@
#define PIN_LED1 LED_GREEN
#define LED_NOTIFICATION LED_BLUE
#define LED_PIN LED_GREEN
#define LED_POWER LED_GREEN
#define ledOff(pin) pinMode(pin, INPUT)
#define LED_STATE_ON 1 // State when LED is litted
@@ -32,7 +32,7 @@
#define PIN_LED1 LED_GREEN
#define LED_NOTIFICATION LED_BLUE
#define LED_PIN LED_GREEN
#define LED_POWER LED_GREEN
#define ledOff(pin) pinMode(pin, INPUT)
#define LED_STATE_ON 1 // State when LED is litted
+1 -1
View File
@@ -30,7 +30,7 @@ Expansion Board Infomation : https://www.seeedstudio.com/Seeeduino-XIAO-Expansio
L76K GPS Module Information : https://www.seeedstudio.com/L76K-GNSS-Module-for-Seeed-Studio-XIAO-p-5864.html
*/
#define LED_PIN 48
#define LED_POWER 48
#define LED_STATE_ON 1 // State when LED is lit
#define BUTTON_PIN 21 // This is the Program Button
+1 -1
View File
@@ -67,7 +67,7 @@
#endif
// LED
#define LED_PIN 18
#define LED_POWER 18
#define LED_STATE_ON 1 // HIGH = ON
// Battery ADC
+1 -1
View File
@@ -12,7 +12,7 @@
#define HAS_SCREEN 1 // Allow for OLED Screens on I2C Header of shield
#define LED_PIN 38 // If defined we will blink this LED
#define LED_POWER 38 // If defined we will blink this LED
#define BUTTON_PIN 0 // If defined, this will be used for user button presses,
#define BUTTON_NEED_PULLUP
+1 -1
View File
@@ -22,7 +22,7 @@
#define GPS_RX_PIN 44
#define GPS_TX_PIN 43
#define LED_PIN 37
#define LED_POWER 37
#define BUTTON_PIN 0
#define BUTTON_NEED_PULLUP
+1 -1
View File
@@ -14,7 +14,7 @@
#define I2C_SDA1 43
#define I2C_SCL1 44
#define LED_PIN 37 // If defined we will blink this LED
#define LED_POWER 37 // If defined we will blink this LED
#define BUTTON_PIN 0 // If defined, this will be used for user button presses,
#define BUTTON_NEED_PULLUP
@@ -1,4 +1,4 @@
#define LED_PIN 18
#define LED_POWER 18
#define HELTEC_TRACKER_V1_X
+1 -1
View File
@@ -1,4 +1,4 @@
#define LED_PIN 18
#define LED_POWER 18
#define HELTEC_TRACKER_V1_X
+1 -1
View File
@@ -1,4 +1,4 @@
#define LED_PIN 18
#define LED_POWER 18
#define HELTEC_TRACKER_V1_X
+1 -1
View File
@@ -54,7 +54,7 @@
#define SD_SPI_FREQUENCY 25000000
#define LED_PIN 13 // the red part of the RGB LED
#define LED_POWER 13 // the red part of the RGB LED
#define LED_STATE_ON 0 // State when LED is lit
#define ALT_BUTTON_PIN 21 // Button 3 - square - top button in landscape mode
@@ -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
@@ -7,7 +7,7 @@
#define ADC_RESOLUTION (12u)
// LEDs
#define LED_PIN (24u)
#define LED_POWER (24u)
// Serial
#define PIN_SERIAL1_TX (16u)
+1 -1
View File
@@ -9,7 +9,7 @@
#undef GPS_RX_PIN
#undef GPS_TX_PIN
#define LED_PIN 27
#define LED_POWER 27
#define USE_SX1262
@@ -20,7 +20,7 @@
#define BUTTON_PIN 7
// #define BUTTON_NEED_PULLUP
#define LED_PIN PIN_LED
#define LED_POWER PIN_LED
// #define BATTERY_PIN 26
// ratio of voltage divider = 3.0 (R17=200k, R18=100k)
+1 -1
View File
@@ -2,7 +2,7 @@
#define BUTTON_PIN -1 // Pin 17 used for antenna switching via DIO4
#define LED_PIN 1
#define LED_POWER 1
#define HAS_CPU_SHUTDOWN 1
+1 -1
View File
@@ -10,7 +10,7 @@
#define I2C_SDA1 2
#define I2C_SCL1 3
#define LED_PIN PIN_LED1
#define LED_POWER PIN_LED1
#define ledOff(pin) pinMode(pin, INPUT)
#define BUTTON_PIN 9
+1 -1
View File
@@ -17,7 +17,7 @@
#define EXT_NOTIFY_OUT 22
#define BUTTON_PIN -1 // Pin 17 used for antenna switching via DIO4
#define LED_PIN PIN_LED
#define LED_POWER PIN_LED
// #define BATTERY_PIN 26
// ratio of voltage divider = 3.0 (R17=200k, R18=100k)
+1 -1
View File
@@ -52,7 +52,7 @@
#define BUTTON_PIN 18
#define EXT_NOTIFY_OUT 22
#define LED_PIN PIN_LED
#define LED_POWER PIN_LED
#define BATTERY_PIN 26
// ratio of voltage divider = 3.0 (R17=200k, R18=100k)
+1 -1
View File
@@ -15,7 +15,7 @@
#define EXT_NOTIFY_OUT 22
#define BUTTON_PIN 17
#define LED_PIN PIN_LED
#define LED_POWER PIN_LED
#define BATTERY_PIN 26
// ratio of voltage divider = 3.0 (R17=200k, R18=100k)
+1 -1
View File
@@ -19,7 +19,7 @@
#define EXT_NOTIFY_OUT 22
#define BUTTON_PIN 17
#define LED_PIN PIN_LED
#define LED_POWER PIN_LED
#define BATTERY_PIN 26
// ratio of voltage divider = 3.0 (R17=200k, R18=100k)
+1 -1
View File
@@ -5,7 +5,7 @@
#define BUTTON_PIN 2
#define BUTTON_NEED_PULLUP
#define LED_PIN PIN_LED1
#define LED_POWER PIN_LED1
#define ledOff(pin) pinMode(pin, INPUT)
#undef BATTERY_PIN
+1 -1
View File
@@ -15,7 +15,7 @@
#define EXT_NOTIFY_OUT 22
#define BUTTON_PIN 17
#define LED_PIN PIN_LED
#define LED_POWER PIN_LED
#define BATTERY_PIN 26
// ratio of voltage divider = 3.0 (R17=200k, R18=100k)
+2 -2
View File
@@ -15,8 +15,8 @@ Do not expect a working Meshtastic device with this target.
#define USE_STM32WLx
#define LED_PIN PB4 // LED1
// #define LED_PIN PB3 // LED2
#define LED_POWER PB4 // LED1
// #define LED_POWER PB3 // LED2
#define LED_STATE_ON 1
#define SERIAL_PRINT_PORT 1
+1 -1
View File
@@ -6,7 +6,7 @@
// I/O
#define LED_STATE_ON 1
#define PIN_LED1 PA0 // Green LED
#define LED_PIN PIN_LED1
#define LED_POWER PIN_LED1
#define PIN_LED2 PA0 // Red LED
#define USER_LED PIN_LED2
#define BUTTON_PIN PC13
+1 -1
View File
@@ -13,7 +13,7 @@ Do not expect a working Meshtastic device with this target.
#define USE_STM32WLx
#define LED_PIN PA0 // Green LED
#define LED_POWER PA0 // Green LED
#define LED_STATE_ON 1
#define RAK3172
+1 -1
View File
@@ -4,7 +4,7 @@
#define USE_STM32WLx
// I/O
#define LED_PIN PA0 // Red LED
#define LED_POWER PA0 // Red LED
#define LED_STATE_ON 1
#define BUTTON_PIN PH3 // Shared with BOOT0
#define BUTTON_NEED_PULLUP
+1 -1
View File
@@ -14,7 +14,7 @@ Do not expect a working Meshtastic device with this target.
#define USE_STM32WLx
#define LED_PIN PB5
#define LED_POWER PB5
#define LED_STATE_ON 0
#define WIO_E5