Fix 3.5 KY-009: backlight GPIO27 and G on GPIO21.

Align cyd_35r with CYD_PROJECT_GUIDE (ST7796/GT911), export flashable firmware/cyd_35r.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-25 11:33:47 +08:00
parent 9f8d8279f0
commit 39fa51c48e
18 changed files with 443 additions and 78 deletions

View File

@@ -1,5 +1,6 @@
; CYD ESP32-2432S028 — KY-009 RGB LED (R=22, G=27, B=4) + SoftSPI 触控 + LVGL
; 触控/屏配置参考 tftest / hw269test
; KY-009 RGB + LVGL
; 2.8" [env:cyd] R22 G27 B4 BL21 SoftSPI
; 3.5" [env:cyd_35r] R22 G21 B4 BL27 GT911 — see ../CYD_PROJECT_GUIDE.md
[env:cyd]
platform = espressif32
board = esp32dev
@@ -55,19 +56,26 @@ build_flags =
extra_scripts = pre:copy_lv_conf.py
; Optional 3.5" CYD ESP32-3248S035 (ST7796 resistive). Default remains [env:cyd].
; Optional 3.5" CYD ESP32-3248S035C (ST7796 + GT911 capacitive). Default [env:cyd].
; Build: pio run -e cyd_35r
; Keep TOUCH_CS=-1 — GPIO33 is GT911 SDA, not resistive touch CS.
; TFT_BL=GPIO27 (not 21 — 21 is GT911 INT / KY009 G). See ../CYD_PROJECT_GUIDE.md
[env:cyd_35r]
extends = env:cyd
build_unflags =
-DILI9341_2_DRIVER=1
-DTFT_WIDTH=240
-DTFT_HEIGHT=320
-DTFT_BL=21
-DLV_MEM_SIZE=49152
build_flags =
${env:cyd.build_flags}
-UILI9341_2_DRIVER
-DST7796_DRIVER=1
-UTFT_WIDTH
-UTFT_HEIGHT
-DTFT_WIDTH=320
-DTFT_HEIGHT=480
-UTFT_BL
-DTFT_BL=27
-DCYD_BOARD_3248S035=1
-DUSE_HSPI_PORT
-DSUPPORT_TRANSACTIONS
-DTFT_RGB_ORDER=TFT_BGR
-DLV_MEM_SIZE=32768