Add optional cyd_35r (ESP32-3248S035) with 480x320 UI; default remains 2.8.
This commit is contained in:
@@ -1,10 +1,20 @@
|
||||
#pragma once
|
||||
|
||||
// CYD ESP32-2432S028R — 触控/屏脚与 tftest 一致
|
||||
// LCD1602A + I2C 转接板(PCF8574):SDA=GPIO22,SCL=GPIO27
|
||||
// 常见地址 0x27 / 0x3F(上电扫描)
|
||||
// Board pins — 2.8" default; 3.5" when CYD_BOARD_3248S035 is set (env:cyd_35r)
|
||||
|
||||
#if defined(CYD_BOARD_3248S035)
|
||||
#define TFT_BL_PIN 27
|
||||
#define SCREEN_WIDTH 320
|
||||
#define SCREEN_HEIGHT 480
|
||||
#define UI_HOR_RES 480
|
||||
#define UI_VER_RES 320
|
||||
#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
|
||||
|
||||
#define CYD_TOUCH_IRQ 36
|
||||
#define CYD_TOUCH_MOSI 32
|
||||
@@ -12,13 +22,15 @@
|
||||
#define CYD_TOUCH_CLK 25
|
||||
#define CYD_TOUCH_CS 33
|
||||
|
||||
/* Map 320x240 design coordinates onto the active UI resolution (identity on 2.8"). */
|
||||
#define UX(x) ((int)(((long)(x) * (UI_HOR_RES)) / 320))
|
||||
#define UY(y) ((int)(((long)(y) * (UI_VER_RES)) / 240))
|
||||
#define UW(w) UX(w)
|
||||
#define UH(h) UY(h)
|
||||
|
||||
|
||||
#define LCD_I2C_SDA_PIN 22
|
||||
#define LCD_I2C_SCL_PIN 27
|
||||
#define LCD_I2C_FREQ_HZ 100000
|
||||
#define LCD_COLS 16
|
||||
#define LCD_ROWS 2
|
||||
|
||||
#define SCREEN_WIDTH 240
|
||||
#define SCREEN_HEIGHT 320
|
||||
#define UI_HOR_RES 320
|
||||
#define UI_VER_RES 240
|
||||
|
||||
Reference in New Issue
Block a user