consolidate sketches

This commit is contained in:
2026-02-16 17:53:06 -08:00
parent 75c3f5706b
commit 838afaa36f
42 changed files with 5655 additions and 817 deletions

View File

@@ -0,0 +1,52 @@
#pragma once
#define BOARD_NAME "WS_S3_43"
#define DISPLAY_WIDTH 800
#define DISPLAY_HEIGHT 480
#define DISPLAY_ROTATION 0 // landscape, USB-C on left
// ── RGB parallel bus pins (directly to ST7262 panel) ──
#define LCD_DE 40
#define LCD_VSYNC 41
#define LCD_HSYNC 39
#define LCD_PCLK 42
#define LCD_R0 45
#define LCD_R1 48
#define LCD_R2 47
#define LCD_R3 21
#define LCD_R4 14
#define LCD_G0 5
#define LCD_G1 6
#define LCD_G2 7
#define LCD_G3 15
#define LCD_G4 16
#define LCD_G5 4
#define LCD_B0 8
#define LCD_B1 3
#define LCD_B2 46
#define LCD_B3 9
#define LCD_B4 1
// ── CH422G I2C IO expander ──
// Controls LCD_RST, TP_RST, LCD_BL, SD_CS via I2C
#define I2C_SDA 17
#define I2C_SCL 18
#define I2C_FREQ 100000
// CH422G I2C command addresses
#define CH422G_WRITE_OC 0x46
#define CH422G_SET_MODE 0x48
#define CH422G_READ_IN 0x4C
// EXIO bit positions
#define EXIO_TP_RST (1 << 0) // EXIO1
#define EXIO_LCD_BL (1 << 1) // EXIO2 — also drives DISP signal!
#define EXIO_LCD_RST (1 << 2) // EXIO3
#define EXIO_SD_CS (1 << 3) // EXIO4
// ── GT911 Touch ──
#define GT911_ADDR 0x5D
#define TOUCH_INT -1 // not wired to a readable GPIO on this board