|
395 | 395 | #define LCD_BACKLIGHT_PIN -1
|
396 | 396 |
|
397 | 397 | #elif HAS_SPI_TFT // Config for Classic UI (emulated DOGM) and Color UI
|
398 |
| - #define TFT_CS_PIN EXP1_07_PIN |
399 |
| - #define TFT_DC_PIN EXP1_08_PIN |
| 398 | + |
| 399 | + #define SDCARD_CONNECTION ONBOARD |
| 400 | + |
| 401 | + #define BEEPER_PIN EXP1_01_PIN |
| 402 | + |
| 403 | + #define BTN_ENC EXP1_02_PIN |
| 404 | + #define BTN_EN1 EXP2_03_PIN |
| 405 | + #define BTN_EN2 EXP2_05_PIN |
| 406 | + |
400 | 407 | #define TFT_A0_PIN TFT_DC_PIN
|
401 |
| - #define TFT_MISO_PIN EXP2_01_PIN |
402 |
| - #define TFT_BACKLIGHT_PIN EXP1_03_PIN |
403 |
| - #define TFT_RESET_PIN EXP1_04_PIN |
404 | 408 |
|
405 |
| - #define LCD_USE_DMA_SPI |
| 409 | + #ifndef TFT_WIDTH |
| 410 | + #define TFT_WIDTH 480 |
| 411 | + #endif |
| 412 | + #ifndef TFT_HEIGHT |
| 413 | + #define TFT_HEIGHT 320 |
| 414 | + #endif |
| 415 | + |
| 416 | + #if ENABLED(BTT_TFT35_SPI_V1_0) |
| 417 | + |
| 418 | + /** |
| 419 | + * ------ ------ |
| 420 | + * BEEPER | 1 2 | LCD-BTN MISO | 1 2 | CLK |
| 421 | + * T_MOSI | 3 4 | T_CS LCD-ENCA | 3 4 | TFTCS |
| 422 | + * T_CLK | 5 6 T_MISO LCD-ENCB | 5 6 MOSI |
| 423 | + * PENIRQ | 7 8 | F_CS RS | 7 8 | RESET |
| 424 | + * GND | 9 10 | VCC GND | 9 10 | NC |
| 425 | + * ------ ------ |
| 426 | + * EXP1 EXP2 |
| 427 | + * |
| 428 | + * 480x320, 3.5", SPI Display with Rotary Encoder. |
| 429 | + * Stock Display for the BIQU B1 SE Series. |
| 430 | + * Schematic: https://github.com/bigtreetech/TFT35-SPI/blob/master/v1/Hardware/BTT%20TFT35-SPI%20V1-SCH.pdf |
| 431 | + */ |
| 432 | + #define TFT_CS_PIN EXP2_04_PIN |
| 433 | + #define TFT_DC_PIN EXP2_07_PIN |
| 434 | + |
| 435 | + #define TFT_SCK_PIN EXP2_02_PIN |
| 436 | + #define TFT_MISO_PIN EXP2_01_PIN |
| 437 | + #define TFT_MOSI_PIN EXP2_06_PIN |
| 438 | + |
| 439 | + #define TOUCH_CS_PIN EXP1_04_PIN |
| 440 | + #define TOUCH_SCK_PIN EXP1_05_PIN |
| 441 | + #define TOUCH_MISO_PIN EXP1_06_PIN |
| 442 | + #define TOUCH_MOSI_PIN EXP1_03_PIN |
| 443 | + #define TOUCH_INT_PIN EXP1_07_PIN |
| 444 | + |
| 445 | + #elif ENABLED(MKS_TS35_V2_0) |
| 446 | + |
| 447 | + #ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING |
| 448 | + #error "CAUTION! MKS_TS35_V2_0 requires wiring modifications. The SKR 1.4 EXP ports are rotated 180° from what the MKS_TS35_V2_0 expects. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this error.)" |
| 449 | + #endif |
| 450 | + |
| 451 | + /** ------ ------ |
| 452 | + * BEEPER | 1 2 | BTN_ENC SPI1_MISO | 1 2 | SPI1_SCK |
| 453 | + * TFT_BKL / LCD_EN | 3 4 | TFT_RESET / LCD_RS BTN_EN1 | 3 4 | SPI1_CS |
| 454 | + * TOUCH_CS / LCD_D4 | 5 6 TOUCH_INT / LCD_D5 BTN_EN2 | 5 6 SPI1_MOSI |
| 455 | + * SPI1_CS / LCD_D6 | 7 8 | SPI1_RS / LCD_D7 SPI1_RS | 7 8 | RESET |
| 456 | + * GND | 9 10 | VCC GND | 9 10 | VCC |
| 457 | + * ------ ------ |
| 458 | + * EXP1 EXP2 |
| 459 | + */ |
| 460 | + #define TFT_CS_PIN EXP1_07_PIN |
| 461 | + #define TFT_DC_PIN EXP1_08_PIN |
| 462 | + |
| 463 | + #define TFT_RESET_PIN EXP1_04_PIN |
| 464 | + #define TFT_BACKLIGHT_PIN EXP1_03_PIN |
| 465 | + |
| 466 | + //#define TFT_RST_PIN EXP2_07_PIN |
| 467 | + #define TFT_SCK_PIN EXP2_02_PIN |
| 468 | + #define TFT_MISO_PIN EXP2_01_PIN |
| 469 | + #define TFT_MOSI_PIN EXP2_06_PIN |
406 | 470 |
|
407 |
| - #define TOUCH_INT_PIN EXP1_06_PIN |
408 |
| - #define TOUCH_CS_PIN EXP1_05_PIN |
409 |
| - #define TOUCH_BUTTONS_HW_SPI |
410 |
| - #define TOUCH_BUTTONS_HW_SPI_DEVICE 1 |
| 471 | + #define LCD_USE_DMA_SPI |
411 | 472 |
|
412 |
| - // SPI 1 |
413 |
| - #define SD_SCK_PIN EXP2_02_PIN |
414 |
| - #define SD_MISO_PIN EXP2_01_PIN |
415 |
| - #define SD_MOSI_PIN EXP2_06_PIN |
| 473 | + #define TFT_BUFFER_WORDS 2400 |
416 | 474 |
|
417 |
| - #define TFT_BUFFER_WORDS 2400 |
| 475 | + #define TOUCH_CS_PIN EXP1_05_PIN |
| 476 | + #define TOUCH_INT_PIN EXP1_06_PIN |
| 477 | + #define TOUCH_BUTTONS_HW_SPI |
| 478 | + #define TOUCH_BUTTONS_HW_SPI_DEVICE 1 |
| 479 | + |
| 480 | + #endif |
| 481 | + |
| 482 | + #if ENABLED(TFT_CLASSIC_UI) |
| 483 | + #ifndef TOUCH_CALIBRATION_X |
| 484 | + #define TOUCH_CALIBRATION_X -16794 |
| 485 | + #endif |
| 486 | + #ifndef TOUCH_CALIBRATION_Y |
| 487 | + #define TOUCH_CALIBRATION_Y 11000 |
| 488 | + #endif |
| 489 | + #ifndef TOUCH_OFFSET_X |
| 490 | + #define TOUCH_OFFSET_X 1024 |
| 491 | + #endif |
| 492 | + #ifndef TOUCH_OFFSET_Y |
| 493 | + #define TOUCH_OFFSET_Y -352 |
| 494 | + #endif |
| 495 | + |
| 496 | + #elif ENABLED(TFT_COLOR_UI) |
| 497 | + #ifndef TOUCH_CALIBRATION_X |
| 498 | + #define TOUCH_CALIBRATION_X -16741 |
| 499 | + #endif |
| 500 | + #ifndef TOUCH_CALIBRATION_Y |
| 501 | + #define TOUCH_CALIBRATION_Y 11258 |
| 502 | + #endif |
| 503 | + #ifndef TOUCH_OFFSET_X |
| 504 | + #define TOUCH_OFFSET_X 1024 |
| 505 | + #endif |
| 506 | + #ifndef TOUCH_OFFSET_Y |
| 507 | + #define TOUCH_OFFSET_Y -367 |
| 508 | + #endif |
| 509 | + #define TFT_BUFFER_WORDS 2400 |
| 510 | + #endif |
418 | 511 |
|
419 | 512 | #elif IS_TFTGLCD_PANEL
|
420 | 513 |
|
|
0 commit comments