Seeed ESP32S3 - Enable user button, tied to yellow LED on

ESP32S3 board.  Can be shared, but configure as button
input only for now.  Top LED for TX indication.
pull/106/head
Kevin Brosius 2025-02-23 16:57:36 -05:00
parent bc97e513e8
commit c3fe3713b0
2 changed files with 17 additions and 7 deletions

View File

@ -146,6 +146,7 @@
// test build - KJB
#define BOARD_MODEL BOARD_SEEED_XIAO_ESP32S3
//#define BOARD_MODEL BOARD_HELTEC32_V3
#define HAS_DISPLAY false
#define HAS_BLUETOOTH false
@ -618,14 +619,17 @@
#define HAS_SD false
#define HAS_EEPROM true
#define HAS_INPUT false
#define HAS_INPUT true
#define HAS_SLEEP false
// #define PMU_IRQ 40
// #define I2C_SCL 41
// #define I2C_SDA 42
const int pin_btn_usr1 = 0;
// Wio-SX1262 button pulls down GPIO21
// THis is shared with the Yellow LED
// on the ESP32S3 (also active Low)
const int pin_btn_usr1 = 21;
const int pin_cs = 41; //16;
const int pin_reset = 42; //14;
@ -643,7 +647,9 @@
// const int IMU_CS = 34;
// HAS LED/tx on board - 47
// HAS LED/tx on Wio board - 48 Hi/ON
// LED 21 on ESP board - Lo/ON/Yellow
// shared with button input.
#if HAS_NP == false
#if defined(EXTERNAL_LEDS)
const int pin_led_rx = -1;

View File

@ -286,10 +286,14 @@ uint8_t boot_vector = 0x00;
void led_id_on() { }
void led_id_off() { }
#elif BOARD_MODEL == BOARD_SEEED_XIAO_ESP32S3
void led_rx_on() { digitalWrite(pin_led_rx, LED_ON); }
void led_rx_off() { digitalWrite(pin_led_rx, LED_OFF); }
void led_tx_on() { }
void led_tx_off() { }
// tx pin is active high, rx pin is active low....
// but shared with LED, choose button for now
// void led_rx_on() { pinMode(pin_led_rx, OUTPUT); digitalWrite(pin_led_rx, LOW); }
// void led_rx_off() { digitalWrite(pin_led_rx, HIGH); pinMode(pin_led_rx, INPUT); }
void led_rx_on() { }
void led_rx_off() { }
void led_tx_on() { digitalWrite(pin_led_tx, LED_ON); }
void led_tx_off() { digitalWrite(pin_led_tx, LED_OFF); }
void led_id_on() { }
void led_id_off() { }
#elif BOARD_MODEL == BOARD_HUZZAH32