@@ -57,7 +57,8 @@ namespace lgfx
57
57
#if defined ( ARDUINO_ESP32_S3_BOX )
58
58
#define LGFX_ESP32_S3_BOX
59
59
#define LGFX_ESP32_S3_BOX_LITE
60
- #define LGFX_DEFAULT_BOARD board_t ::board_ESP32_S3_BOX
60
+ #define LGFX_ESP32_S3_BOX_V3
61
+ #define LGFX_DEFAULT_BOARD board_t ::board_ESP32_S3_BOX_V3
61
62
62
63
#elif defined ( ARDUINO_ADAFRUIT_FEATHER_ESP32S3_TFT )
63
64
#define LGFX_FEATHER_ESP32_S3_TFT
@@ -1211,8 +1212,6 @@ namespace lgfx
1211
1212
result->panel = p;
1212
1213
{
1213
1214
auto cfg = p->config ();
1214
- // cfg.pin_cs = GPIO_NUM_5;
1215
- // cfg.pin_rst = GPIO_NUM_48;
1216
1215
cfg.offset_rotation = 1 ;
1217
1216
p->config (cfg); // config設定;
1218
1217
p->setRotation (1 ); // config設定後に向きを設定;
@@ -1267,8 +1266,6 @@ namespace lgfx
1267
1266
result->panel = p;
1268
1267
{
1269
1268
auto cfg = p->config ();
1270
- // cfg.pin_cs = GPIO_NUM_5;
1271
- // cfg.pin_rst = GPIO_NUM_48;
1272
1269
cfg.invert = true ;
1273
1270
cfg.offset_rotation = 2 ;
1274
1271
p->config (cfg);
@@ -1278,6 +1275,67 @@ namespace lgfx
1278
1275
}
1279
1276
};
1280
1277
1278
+
1279
+ struct _detector_ESP32_S3_BOX_V3_t : public _detector_spi_t
1280
+ {
1281
+ constexpr _detector_ESP32_S3_BOX_V3_t (void ) :
1282
+ _detector_spi_t
1283
+ { board_t ::board_ESP32_S3_BOX_V3
1284
+ , 0 , 0 , 0 // TODO? ILI9342C ID Checker
1285
+ , 40000000 , 16000000
1286
+ , GPIO_NUM_6 // MOSI
1287
+ , (gpio_num_t )-1 // MISO
1288
+ , GPIO_NUM_7 // SCLK
1289
+ , GPIO_NUM_4 // DC
1290
+ , GPIO_NUM_5 // CS
1291
+ , (gpio_num_t )-1 // RST
1292
+ , (gpio_num_t )-1 // TF CARD CS
1293
+ , 0 // SPI MODE
1294
+ , true // SPI 3wire
1295
+ , SPI2_HOST // SPI HOST
1296
+ } {}
1297
+
1298
+ void setup (_detector_result_t * result) const override
1299
+ {
1300
+ ESP_LOGI (LIBRARY_NAME, " [Autodetect] ESP32_S3_BOX_V3" );
1301
+ lgfx::pinMode (GPIO_NUM_48, lgfx::pin_mode_t ::input_pullup);
1302
+ auto p = new Panel_ILI9342 ();
1303
+ result->panel = p;
1304
+ {
1305
+ auto cfg = p->config ();
1306
+ cfg.offset_rotation = 1 ;
1307
+ p->config (cfg); // config設定;
1308
+ p->setRotation (1 ); // config設定後に向きを設定;
1309
+ p->light (_create_pwm_backlight (GPIO_NUM_47, 0 , 12000 ));
1310
+ }
1311
+
1312
+ {
1313
+ auto t = new lgfx::Touch_GT911 ();
1314
+ auto cfg = t->config ();
1315
+ cfg.pin_int = GPIO_NUM_3;
1316
+ cfg.pin_sda = GPIO_NUM_8;
1317
+ cfg.pin_scl = GPIO_NUM_18;
1318
+ cfg.i2c_addr = 0x14 ;
1319
+ cfg.i2c_port = I2C_NUM_0;
1320
+ cfg.x_min = 0 ;
1321
+ cfg.x_max = 319 ;
1322
+ cfg.y_min = 0 ;
1323
+ // Max-y = 239 + 40 pixels for "red" touch point below LCD active area
1324
+ cfg.y_max = 279 ;
1325
+ cfg.offset_rotation = 2 ;
1326
+ cfg.bus_shared = false ;
1327
+ t->config (cfg);
1328
+ if (!t->init ())
1329
+ {
1330
+ cfg.i2c_addr = 0x5D ; // addr change (0x14 or 0x5D)
1331
+ t->config (cfg);
1332
+ }
1333
+ p->touch (t);
1334
+ }
1335
+ }
1336
+ };
1337
+
1338
+
1281
1339
struct _detector_Makerfabs_ESP32_S3_TFT_Touch_SPI_t : public _detector_spi_t
1282
1340
{
1283
1341
constexpr _detector_Makerfabs_ESP32_S3_TFT_Touch_SPI_t (void ) :
@@ -3245,6 +3303,7 @@ namespace lgfx
3245
3303
static constexpr const _detector_M5StackCoreS3_t detector_M5StackCoreS3;
3246
3304
static constexpr const _detector_ESP32_S3_BOX_t detector_ESP32_S3_BOX;
3247
3305
static constexpr const _detector_ESP32_S3_BOX_Lite_t detector_ESP32_S3_BOX_Lite;
3306
+ static constexpr const _detector_ESP32_S3_BOX_V3_t detector_ESP32_S3_BOX_V3;
3248
3307
static constexpr const _detector_Makerfabs_ESP32_S3_TFT_Touch_SPI_t detector_Makerfabs_ESP32_S3_TFT_Touch_SPI;
3249
3308
static constexpr const _detector_Makerfabs_ESP32_S3_TFT_Touch_Parallel16_t detector_Makerfabs_ESP32_S3_TFT_Touch_Parallel16;
3250
3309
static constexpr const _detector_wywy_ESP32S3_HMI_DevKit_t detector_wywy_ESP32S3_HMI_DevKit;
@@ -3267,6 +3326,9 @@ namespace lgfx
3267
3326
#if defined ( LGFX_AUTODETECT ) || defined ( LGFX_ESP32_S3_BOX_LITE )
3268
3327
&detector_ESP32_S3_BOX_Lite,
3269
3328
#endif
3329
+ #if defined ( LGFX_AUTODETECT ) || defined ( LGFX_ESP32_S3_BOX_V3 )
3330
+ &detector_ESP32_S3_BOX_V3,
3331
+ #endif
3270
3332
#if defined ( LGFX_AUTODETECT ) || defined ( LGFX_MAKERFABS_TFT_TOUCH_SPI )
3271
3333
&detector_Makerfabs_ESP32_S3_TFT_Touch_SPI,
3272
3334
#endif
0 commit comments