Fix 3.5C backlight and GT911: BL=GPIO27, INT left as input after reset.
Black screen on cyd_35r came from TFT_BL=21; align pins/platformio/touch with CYD_PROJECT_GUIDE and export firmware/cyd_35r. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -8,19 +8,25 @@
|
||||
#define SCREEN_HEIGHT 480
|
||||
#define UI_HOR_RES 480
|
||||
#define UI_VER_RES 320
|
||||
/* 3.5C capacitive GT911 (ESP32-3248S035C). GPIO33 is I2C SDA, not TOUCH_CS.
|
||||
* Backlight is GPIO27; INT is GPIO21 — they are NOT the same pin. */
|
||||
#define CYD_GT911_SDA 33
|
||||
#define CYD_GT911_SCL 32
|
||||
#define CYD_GT911_INT 21
|
||||
#define CYD_GT911_RST 25
|
||||
#else
|
||||
#define TFT_BL_PIN 21
|
||||
#define SCREEN_WIDTH 240
|
||||
#define SCREEN_HEIGHT 320
|
||||
#define UI_HOR_RES 320
|
||||
#define UI_VER_RES 240
|
||||
#endif
|
||||
|
||||
/* 2.8" CYD: dedicated SoftSPI touch bus. */
|
||||
#define CYD_TOUCH_IRQ 36
|
||||
#define CYD_TOUCH_MOSI 32
|
||||
#define CYD_TOUCH_MISO 39
|
||||
#define CYD_TOUCH_CLK 25
|
||||
#define CYD_TOUCH_CS 33
|
||||
#endif
|
||||
|
||||
/* Map 320x240 design coordinates onto the active UI resolution (identity on 2.8"). */
|
||||
#define UX(x) ((int)(((long)(x) * (UI_HOR_RES)) / 320))
|
||||
@@ -28,6 +34,13 @@
|
||||
#define UW(w) UX(w)
|
||||
#define UH(h) UY(h)
|
||||
|
||||
/* Partial frame buffer: 3.5 needs smaller ratio to fit DRAM. */
|
||||
#if defined(CYD_BOARD_3248S035)
|
||||
#define DRAW_BUF_DIV 20
|
||||
#else
|
||||
#define DRAW_BUF_DIV 10
|
||||
#endif
|
||||
|
||||
|
||||
#define SOUND_PIN 22
|
||||
#define SOUND_ACTIVE_HIGH 1
|
||||
|
||||
Reference in New Issue
Block a user