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,22 @@
#ifndef Pins_Arduino_h
#define Pins_Arduino_h
#include <stdint.h>
#define USB_VID 0x303a
#define USB_PID 0x1001
static const uint8_t TX = 43;
static const uint8_t RX = 44;
// The default Wire will be mapped to PMU and RTC
static const uint8_t SDA = 8;
static const uint8_t SCL = 9;
// Default SPI
static const uint8_t MISO = 39;
static const uint8_t SCK = 21;
static const uint8_t MOSI = 38;
static const uint8_t SS = 40;
#endif /* Pins_Arduino_h */

View File

@@ -0,0 +1,56 @@
[env:picomputer-s3]
extends = esp32s3_base
board = bpi_picow_esp32_s3
board_check = true
board_build.partitions = default_8MB.csv
;OpenOCD flash method
;upload_protocol = esp-builtin
;Normal method
upload_protocol = esptool
build_flags =
${esp32s3_base.build_flags}
-DPICOMPUTER_S3
-I variants/esp32s3/picomputer-s3
lib_deps =
${esp32s3_base.lib_deps}
lovyan03/LovyanGFX@^1.2.0
build_src_filter =
${esp32s3_base.build_src_filter}
[env:picomputer-s3-tft]
extends = env:picomputer-s3
build_flags =
${env:picomputer-s3.build_flags}
-D INPUTDRIVER_MATRIX_TYPE=1
-D USE_PIN_BUZZER=PIN_BUZZER
-D USE_SX127x
-D HAS_SCREEN=1
-D HAS_TFT=1
-D RAM_SIZE=1560
-D LV_LVGL_H_INCLUDE_SIMPLE
-D LV_CONF_INCLUDE_SIMPLE
-D LV_COMP_CONF_INCLUDE_SIMPLE
-D LV_USE_SYSMON=0
-D LV_USE_PROFILER=0
-D LV_USE_PERF_MONITOR=0
-D LV_USE_MEM_MONITOR=0
-D LV_USE_LOG=0
-D USE_LOG_DEBUG
-D LOG_DEBUG_INC=\"DebugConfiguration.h\"
-D LGFX_SCREEN_WIDTH=240
-D LGFX_SCREEN_HEIGHT=320
-D DISPLAY_SIZE=320x240 ; landscape mode
-D LGFX_DRIVER=LGFX_PICOMPUTER_S3
-D GFX_DRIVER_INC=\"graphics/LGFX/LGFX_PICOMPUTER_S3.h\"
-D VIEW_320x240
; -D USE_DOUBLE_BUFFER
-D USE_PACKET_API
lib_deps =
${env:picomputer-s3.lib_deps}
${device-ui_base.lib_deps}

View File

@@ -0,0 +1,65 @@
#undef GPS_RX_PIN
#undef GPS_TX_PIN
#define BUTTON_PIN 0
#define PIN_BUZZER 43
#define HAS_WIRE 0
#define BATTERY_PIN ADC1_CHANNEL_1_GPIO_NUM // 2
// A battery voltage measurement pin, voltage divider connected here to measure battery voltage
// ratio of voltage divider = 3.0 (R11=200k, R7=100k)
#define ADC_MULTIPLIER 3.1 // 3.0 with correction of display undervoltage.
#define ADC_CHANNEL ADC1_GPIO2_CHANNEL
#define USE_RF95 // RFM95/SX127x
#define LORA_SCK SCK // 21
#define LORA_MISO MISO // 39
#define LORA_MOSI MOSI // 38
#define LORA_CS SS // 40
#define LORA_RESET RADIOLIB_NC
// per SX1276_Receive_Interrupt/utilities.h
#define LORA_DIO0 10
#define LORA_DIO1 RADIOLIB_NC
#define LORA_DIO2 RADIOLIB_NC
// Default SPI1 will be mapped to the display
#define ST7789_SDA 4
#define ST7789_SCK 3
#define ST7789_CS 6
#define ST7789_RS 1
#define ST7789_BL 5
#define ST7789_RESET -1
#define ST7789_MISO -1
#define ST7789_BUSY -1
#define ST7789_SPI_HOST SPI3_HOST
#define TFT_BL 5
#define SPI_FREQUENCY 40000000
#define SPI_READ_FREQUENCY 16000000
#define TFT_HEIGHT 320
#define TFT_WIDTH 240
#define TFT_OFFSET_X 0
#define TFT_OFFSET_Y 0
#define TFT_OFFSET_ROTATION 0
#define SCREEN_ROTATE
#define SCREEN_TRANSITION_FRAMERATE 5
// Picomputer gets a white on black display
#define TFT_MESH_OVERRIDE COLOR565(255, 255, 255)
#define CANNED_MESSAGE_MODULE_ENABLE 1
#define INPUTBROKER_MATRIX_TYPE 1
#define KEYS_COLS \
{ \
44, 47, 17, 15, 13, 41 \
}
#define KEYS_ROWS \
{ \
12, 16, 42, 18, 14, 7 \
}