ESP32s3: Migrate variants to new structure (#7343)

This commit is contained in:
Austin
2025-07-20 17:47:37 -04:00
committed by GitHub
parent b851b15a73
commit 475cfe4af2
127 changed files with 126 additions and 101 deletions

View File

@@ -0,0 +1,26 @@
#ifndef Pins_Arduino_h
#define Pins_Arduino_h
#include <stdint.h>
#define USB_VID 0x303a
#define USB_PID 0x1001
// The default Wire will be mapped to PMU and RTC
static const uint8_t SDA = 21;
static const uint8_t SCL = 15;
// Default SPI will be mapped to Radio
static const uint8_t SS = 14;
static const uint8_t MOSI = 8;
static const uint8_t MISO = 9;
static const uint8_t SCK = 3;
#define SPI_MOSI (40)
#define SPI_SCK (39)
#define SPI_MISO (13)
#define SPI_CS (10)
// IO42 TF_3V3_CTL
#define SDCARD_CS SPI_CS
#endif /* Pins_Arduino_h */

View File

@@ -0,0 +1,89 @@
[env:crowpanel-esp32s3-5-epaper]
extends = esp32s3_base
board_build.arduino.memory_type = qio_opi
board_build.flash_mode = qio
board_build.psram_type = opi
board_upload.flash_size = 8MB
board_upload.maximum_size = 8388608
board_build.partitions = default_8MB.csv
board = esp32-s3-devkitc-1
;upload_port = /dev/ttyUSB0
board_level = extra
upload_protocol = esptool
build_flags =
${esp32s3_base.build_flags}
-D CROWPANEL_ESP32S3_5_EPAPER
-I variants/esp32s3/crowpanel-esp32s3-5-epaper
-D PRIVATE_HW
-DBOARD_HAS_PSRAM
-DGPS_POWER_TOGGLE
-DEINK_DISPLAY_MODEL=GxEPD2_579_GDEY0579T93 ;https://www.good-display.com/product/439.html
-DEINK_WIDTH=792
-DEINK_HEIGHT=272
-DUSE_EINK_DYNAMICDISPLAY ; Enable Dynamic EInk
-DEINK_LIMIT_FASTREFRESH=100 ; How many consecutive fast-refreshes are permitted
;-DEINK_LIMIT_RATE_BACKGROUND_SEC=30 ; Minimum interval between BACKGROUND updates
;-DEINK_LIMIT_RATE_RESPONSIVE_SEC=1
lib_deps =
${esp32s3_base.lib_deps}
https://github.com/meshtastic/GxEPD2/archive/33db3fa8ee6fc47d160bdb44f8f127c9a9203a10.zip
[env:crowpanel-esp32s3-4-epaper]
extends = esp32s3_base
board_build.arduino.memory_type = qio_opi
board_build.flash_mode = qio
board_build.psram_type = opi
board_upload.flash_size = 8MB
board_upload.maximum_size = 8388608
board_build.partitions = default_8MB.csv
board = esp32-s3-devkitc-1
;upload_port = /dev/ttyUSB0
board_level = extra
upload_protocol = esptool
build_flags =
${esp32s3_base.build_flags}
-D CROWPANEL_ESP32S3_4_EPAPER
-I variants/esp32s3/crowpanel-esp32s3-5-epaper
-D PRIVATE_HW
-DBOARD_HAS_PSRAM
-DGPS_POWER_TOGGLE
-DEINK_DISPLAY_MODEL=GxEPD2_420_GYE042A87 ; similar Panel: GDEY042T81 : https://www.good-display.com/product/386.html
-DEINK_WIDTH=400
-DEINK_HEIGHT=300
-DUSE_EINK_DYNAMICDISPLAY ; Enable Dynamic EInk
-DEINK_LIMIT_FASTREFRESH=100 ; How many consecutive fast-refreshes are permitted
;-DEINK_LIMIT_RATE_BACKGROUND_SEC=30 ; Minimum interval between BACKGROUND updates
;-DEINK_LIMIT_RATE_RESPONSIVE_SEC=1
lib_deps =
${esp32s3_base.lib_deps}
https://github.com/meshtastic/GxEPD2/archive/33db3fa8ee6fc47d160bdb44f8f127c9a9203a10.zip
[env:crowpanel-esp32s3-2-epaper]
extends = esp32s3_base
board_build.arduino.memory_type = qio_opi
board_build.flash_mode = qio
board_build.psram_type = opi
board_upload.flash_size = 8MB
board_upload.maximum_size = 8388608
board_build.partitions = default_8MB.csv
board = esp32-s3-devkitc-1
;upload_port = /dev/ttyUSB0
board_level = extra
upload_protocol = esptool
build_flags =
${esp32s3_base.build_flags}
-D CROWPANEL_ESP32S3_2_EPAPER
-I variants/esp32s3/crowpanel-esp32s3-5-epaper
-D PRIVATE_HW
-DBOARD_HAS_PSRAM
-DGPS_POWER_TOGGLE
-DEINK_DISPLAY_MODEL=GxEPD2_290_GDEY029T94 ;https://www.good-display.com/product/389.html
-DEINK_WIDTH=296
-DEINK_HEIGHT=128
-DUSE_EINK_DYNAMICDISPLAY ; Enable Dynamic EInk
-DEINK_LIMIT_FASTREFRESH=100 ; How many consecutive fast-refreshes are permitted
;-DEINK_LIMIT_RATE_BACKGROUND_SEC=30 ; Minimum interval between BACKGROUND updates
;-DEINK_LIMIT_RATE_RESPONSIVE_SEC=1
lib_deps =
${esp32s3_base.lib_deps}
https://github.com/meshtastic/GxEPD2/archive/33db3fa8ee6fc47d160bdb44f8f127c9a9203a10.zip

View File

@@ -0,0 +1,77 @@
#define HAS_SDCARD
#define SDCARD_USE_SPI1
// Display (E-Ink)
#define USE_EINK
#define PIN_EINK_CS 45
#define PIN_EINK_BUSY 48
#define PIN_EINK_DC 46
#define PIN_EINK_RES 47
#define PIN_EINK_SCLK 12
#define PIN_EINK_MOSI 11
#define VEXT_ENABLE 7 // e-ink power enable pin
#define VEXT_ON_VALUE HIGH
#define PIN_POWER_EN 42 // TF/SD Card Power Enable Pin
// #define BATTERY_PIN 1 // A battery voltage measurement pin, voltage divider connected here to
// measure battery voltage ratio of voltage divider = 2.0 (assumption)
// #define ADC_MULTIPLIER 2.11 // 2.0 + 10% for correction of display undervoltage.
// #define ADC_CHANNEL ADC1_GPIO1_CHANNEL
#define I2C_SDA SDA // 21
#define I2C_SCL SCL // 15
#define GPS_DEFAULT_NOT_PRESENT 1
// #define GPS_RX_PIN 44
// #define GPS_TX_PIN 43
#define LED_PIN 41
#define BUTTON_PIN 2
#define BUTTON_NEED_PULLUP
// Buzzer - noisy ?
#define PIN_BUZZER (0 + 18)
// Wheel
// Up 6
// Push 5
// Down 4
// MENU Top 2
// EXIT Bottom 1
// 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
// #define USE_RF95 // RFM95/SX127x
#define USE_SX1262
// #define USE_SX1280
#define LORA_SCK 3
#define LORA_MISO 9
#define LORA_MOSI 8
#define LORA_CS 14
#define LORA_RESET 38
#define LORA_DIO1 16
#define LORA_DIO2 17
// per SX1262_Receive_Interrupt/utilities.h
#ifdef USE_SX1262
#define SX126X_CS LORA_CS
#define SX126X_DIO1 LORA_DIO1
#define SX126X_BUSY LORA_DIO2
#define SX126X_RESET LORA_RESET
#define SX126X_DIO2_AS_RF_SWITCH
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
#endif
// per SX128x_Receive_Interrupt/utilities.h
#ifdef USE_SX1280
#define SX128X_CS LORA_CS
#define SX128X_DIO1 LORA_DIO1
#define SX128X_BUSY LORA_DIO2
#define SX128X_RESET LORA_RESET
#define SX128X_RXEN 21
#define SX128X_TXEN 15
#define SX128X_MAX_POWER 3
#endif