Files
firmware/variants/esp32s3/t5s3_epaper/variant.h

123 lines
2.5 KiB
C
Raw Normal View History

2025-04-18 19:23:51 +02:00
2025-10-19 20:40:29 +02:00
// Display (E-Ink) ED047TC1
#define USE_EPD
#define EP_I2C_PORT I2C_NUM_0
#define EP_SCL (40)
#define EP_SDA (39)
#define EP_INTR (38)
#define EP_D7 (8)
#define EP_D6 (18)
#define EP_D5 (17)
#define EP_D4 (16)
#define EP_D3 (15)
#define EP_D2 (7)
#define EP_D1 (6)
#define EP_D0 (5)
#define EP_CKV (48)
#define EP_STH (41)
#define EP_LEH (42)
#define EP_STV (45)
#define EP_CKH (4)
2025-04-18 19:23:51 +02:00
#define EPD_WIDTH 960
#define EPD_HEIGHT 540
2025-10-19 21:41:44 +02:00
#if defined(T5_S3_EPAPER_PRO_V1)
#define BOARD_BL_EN 40
#else
#define BOARD_BL_EN 11
#endif
2025-10-18 20:51:49 +02:00
#define I2C_SDA SDA
#define I2C_SCL SCL
2025-04-18 19:23:51 +02:00
2025-10-18 20:51:49 +02:00
#define HAS_TOUCHSCREEN 1
2025-10-19 21:41:44 +02:00
#define GT911_PIN_SDA SDA
#define GT911_PIN_SCL SCL
#if defined(T5_S3_EPAPER_PRO_V1)
#define GT911_PIN_INT 15
#define GT911_PIN_RST 41
#else
2025-10-19 20:40:29 +02:00
#define GT911_PIN_INT 3
#define GT911_PIN_RST 9
2025-10-19 21:41:44 +02:00
#endif
2025-10-18 20:51:49 +02:00
#define PCF85063_RTC 0x51
#define HAS_RTC 1
2025-10-19 20:40:29 +02:00
#define PCF85063_INT 2
2025-10-18 20:51:49 +02:00
#define USE_POWERSAVE
#define SLEEP_TIME 120
2025-04-18 19:23:51 +02:00
2025-10-19 20:40:29 +02:00
// GPS
2025-10-19 21:41:44 +02:00
#if !defined(T5_S3_EPAPER_PRO_V1)
2025-10-18 20:51:49 +02:00
#define GPS_RX_PIN 44
#define GPS_TX_PIN 43
2025-10-19 21:41:44 +02:00
#endif
2025-04-18 19:23:51 +02:00
2025-10-19 22:00:29 +02:00
#define BUTTON_PIN 0
#define PIN_BUTTON2 48
#define ALT_BUTTON_PIN PIN_BUTTON2
2025-04-18 19:23:51 +02:00
2025-10-18 20:51:49 +02:00
// SD card
#define HAS_SDCARD
#define SDCARD_CS SPI_CS
#define SD_SPI_FREQUENCY 75000000U
// battery charger BQ25896
#define HAS_PPM 1
#define XPOWERS_CHIP_BQ25896
// battery quality management BQ27220
#define HAS_BQ27220 1
#define BQ27220_I2C_SDA SDA
#define BQ27220_I2C_SCL SCL
#define BQ27220_DESIGN_CAPACITY 1500
2025-10-19 21:41:44 +02:00
#if !defined(T5_S3_EPAPER_PRO_V1)
2025-10-18 20:51:49 +02:00
// TPS651851
2025-10-19 20:40:29 +02:00
// PCA9535 IO extender
#define USE_XL9555
#define PCA9535_ADDR 0x20
#define PCA9535_INT 38
#define PCA9535_IO00_LORA_EN 00
#define PCA9535_IO10_EP_OE 10 // EP Output enable source driver
#define PCA9535_IO11_EP_MODE 11 // EP Output mode selection gate driver
#define PCA9535_IO12_BUTTON 12
#define PCA9535_IO13_TPS_PWRUP 13
#define PCA9535_IO14_VCOM_CTRL 14
#define PCA9535_IO15_TPS_WAKEUP 15
#define PCA9535_IO16_TPS_PWR_GOOD 16
#define PCA9535_IO17_TPS_INT 17
2025-10-19 21:41:44 +02:00
#endif
2025-10-19 20:40:29 +02:00
2025-10-18 20:51:49 +02:00
// LoRa
2025-04-18 19:23:51 +02:00
#define USE_SX1262
2025-10-18 20:51:49 +02:00
#define USE_SX1268
2025-10-19 21:41:44 +02:00
#define LORA_SCK SCK
#define LORA_MISO MISO
#define LORA_MOSI MOSI
2025-04-18 19:23:51 +02:00
#define LORA_CS 46
2025-10-18 20:51:49 +02:00
#define LORA_DIO0 -1
2025-10-19 21:41:44 +02:00
#if defined(T5_S3_EPAPER_PRO_V1)
#define LORA_RESET 43
#define LORA_DIO1 3 // SX1262 IRQ
#define LORA_DIO2 44 // SX1262 BUSY
#define LORA_DIO3
#else
2025-10-18 20:51:49 +02:00
#define LORA_RESET 1
#define LORA_DIO1 10 // SX1262 IRQ
#define LORA_DIO2 47 // SX1262 BUSY
#define LORA_DIO3
2025-10-19 21:41:44 +02:00
#endif
2025-04-18 19:23:51 +02:00
#define SX126X_CS LORA_CS
#define SX126X_DIO1 LORA_DIO1
2025-10-18 20:51:49 +02:00
#define SX126X_BUSY LORA_DIO2
2025-04-18 19:23:51 +02:00
#define SX126X_RESET LORA_RESET
#define SX126X_DIO2_AS_RF_SWITCH
#define SX126X_DIO3_TCXO_VOLTAGE 2.4