0
0
Fork 0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2025-03-13 01:40:09 +00:00

🩹 Fix SPI TFT build on SKR V2 & V3/EZ (#26041)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
Keith Bennett 2023-07-16 21:32:16 -07:00 committed by GitHub
parent 3815157214
commit fef772ef29
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 115 additions and 19 deletions

View file

@ -377,9 +377,9 @@
#if ANY(TFT_COLOR_UI, TFT_CLASSIC_UI, TFT_LVGL_UI)
#define TFT_A0_PIN 43
#define TFT_CS_PIN 49
#define TFT_DC_PIN 43
#define TFT_A0_PIN TFT_DC_PIN
#define TFT_SCK_PIN SD_SCK_PIN
#define TFT_MISO_PIN SD_MISO_PIN
#define TFT_MOSI_PIN SD_MOSI_PIN

View file

@ -319,7 +319,7 @@
#define BTN_EN1 EXP2_03_PIN
#define BTN_EN2 EXP2_05_PIN
#define TFT_DC_PIN TFT_A0_PIN
#define TFT_A0_PIN TFT_DC_PIN
#ifndef TFT_WIDTH
#define TFT_WIDTH 480
@ -329,10 +329,23 @@
#endif
#if ENABLED(BTT_TFT35_SPI_V1_0)
// 480x320, 3.5", SPI Display with Rotary Encoder.
// Stock Display for the BIQU B1 SE.
/**
* ------ ------
* BEEPER | 1 2 | LCD-BTN MISO | 1 2 | CLK
* T_MOSI | 3 4 | T_CS LCD-ENCA | 3 4 | TFTCS
* T_CLK | 5 6 T_MISO LCD-ENCB | 5 6 MOSI
* PENIRQ | 7 8 | F_CS RS | 7 8 | RESET
* GND | 9 10 | VCC GND | 9 10 | NC
* ------ ------
* EXP1 EXP2
*
* 480x320, 3.5", SPI Display with Rotary Encoder.
* Stock Display for the BIQU B1 SE Series.
* Schematic: https://github.com/bigtreetech/TFT35-SPI/blob/master/v1/Hardware/BTT%20TFT35-SPI%20V1-SCH.pdf
*/
#define TFT_CS_PIN EXP2_04_PIN
#define TFT_A0_PIN EXP2_07_PIN
#define TFT_DC_PIN EXP2_07_PIN
#define TOUCH_CS_PIN EXP1_04_PIN
#define TOUCH_SCK_PIN EXP1_05_PIN
@ -342,8 +355,17 @@
#elif ENABLED(MKS_TS35_V2_0)
/** ------ ------
* BEEPER | 1 2 | BTN_ENC SPI1_MISO | 1 2 | SPI1_SCK
* TFT_BKL / LCD_EN | 3 4 | TFT_RESET / LCD_RS BTN_EN1 | 3 4 | SPI1_CS
* TOUCH_CS / LCD_D4 | 5 6 TOUCH_INT / LCD_D5 BTN_EN2 | 5 6 SPI1_MOSI
* SPI1_CS / LCD_D6 | 7 8 | SPI1_RS / LCD_D7 SPI1_RS | 7 8 | RESET
* GND | 9 10 | VCC GND | 9 10 | VCC
* ------ ------
* EXP1 EXP2
*/
#define TFT_CS_PIN EXP1_07_PIN
#define TFT_A0_PIN EXP1_08_PIN
#define TFT_DC_PIN EXP1_08_PIN
#define TFT_RESET_PIN EXP1_04_PIN

View file

@ -396,8 +396,8 @@
#elif HAS_SPI_TFT // Config for Classic UI (emulated DOGM) and Color UI
#define TFT_CS_PIN EXP1_07_PIN
#define TFT_A0_PIN EXP1_08_PIN
#define TFT_DC_PIN EXP1_08_PIN
#define TFT_A0_PIN TFT_DC_PIN
#define TFT_MISO_PIN EXP2_01_PIN
#define TFT_BACKLIGHT_PIN EXP1_03_PIN
#define TFT_RESET_PIN EXP1_04_PIN

View file

@ -295,8 +295,8 @@
#elif HAS_SPI_TFT // Config for Classic UI (emulated DOGM) and Color UI
#define TFT_CS_PIN EXP1_07_PIN
#define TFT_A0_PIN EXP1_08_PIN
#define TFT_DC_PIN EXP1_08_PIN
#define TFT_A0_PIN TFT_DC_PIN
#define TFT_MISO_PIN EXP2_01_PIN
#define TFT_BACKLIGHT_PIN EXP1_03_PIN
#define TFT_RESET_PIN EXP1_04_PIN

View file

@ -514,15 +514,40 @@
#if HAS_SPI_TFT
#define TFT_SCK_PIN EXP2_02_PIN
#define TFT_MISO_PIN EXP2_01_PIN
#define TFT_MOSI_PIN EXP2_06_PIN
#define BTN_ENC EXP1_02_PIN
#define BTN_EN1 EXP2_03_PIN
#define BTN_EN2 EXP2_05_PIN
#ifndef TFT_WIDTH
#define TFT_WIDTH 480
#endif
#ifndef TFT_HEIGHT
#define TFT_HEIGHT 320
#endif
#if ENABLED(BTT_TFT35_SPI_V1_0)
// 480x320, 3.5", SPI Display with Rotary Encoder.
// Stock Display for the BIQU B1 SE.
/**
* ------ ------
* BEEPER | 1 2 | LCD-BTN MISO | 1 2 | CLK
* T_MOSI | 3 4 | T_CS LCD-ENCA | 3 4 | TFTCS
* T_CLK | 5 6 T_MISO LCD-ENCB | 5 6 MOSI
* PENIRQ | 7 8 | F_CS RS | 7 8 | RESET
* GND | 9 10 | VCC GND | 9 10 | NC
* ------ ------
* EXP1 EXP2
*
* 480x320, 3.5", SPI Display with Rotary Encoder.
* Stock Display for the BIQU B1 SE Series.
* Schematic: https://github.com/bigtreetech/TFT35-SPI/blob/master/v1/Hardware/BTT%20TFT35-SPI%20V1-SCH.pdf
*/
#define TFT_CS_PIN EXP2_04_PIN
#define TFT_A0_PIN EXP2_07_PIN
#define TFT_DC_PIN EXP2_07_PIN
#define TFT_A0_PIN TFT_DC_PIN
#define TOUCH_CS_PIN EXP1_04_PIN
#define TOUCH_SCK_PIN EXP1_05_PIN
@ -530,6 +555,22 @@
#define TOUCH_MOSI_PIN EXP1_03_PIN
#define TOUCH_INT_PIN EXP1_07_PIN
#ifndef TOUCH_CALIBRATION_X
#define TOUCH_CALIBRATION_X 17540
#endif
#ifndef TOUCH_CALIBRATION_Y
#define TOUCH_CALIBRATION_Y -11388
#endif
#ifndef TOUCH_OFFSET_X
#define TOUCH_OFFSET_X -21
#endif
#ifndef TOUCH_OFFSET_Y
#define TOUCH_OFFSET_Y 337
#endif
#ifndef TOUCH_ORIENTATION
#define TOUCH_ORIENTATION TOUCH_LANDSCAPE
#endif
#elif ENABLED(MKS_TS35_V2_0)
/** ------ ------
@ -542,8 +583,8 @@
* EXP1 EXP2
*/
#define TFT_CS_PIN EXP1_07_PIN // SPI1_CS
#define TFT_A0_PIN EXP1_08_PIN // SPI1_RS
#define TFT_DC_PIN TFT_DC_PIN
#define TFT_DC_PIN EXP1_08_PIN // SPI1_RS
#define TFT_A0_PIN TFT_DC_PIN
#define TFT_RESET_PIN EXP1_04_PIN
@ -563,6 +604,22 @@
#define TFT_BUFFER_SIZE 14400
#ifndef TOUCH_CALIBRATION_X
#define TOUCH_CALIBRATION_X -17253
#endif
#ifndef TOUCH_CALIBRATION_Y
#define TOUCH_CALIBRATION_Y 11579
#endif
#ifndef TOUCH_OFFSET_X
#define TOUCH_OFFSET_X 514
#endif
#ifndef TOUCH_OFFSET_Y
#define TOUCH_OFFSET_Y -24
#endif
#ifndef TOUCH_ORIENTATION
#define TOUCH_ORIENTATION TOUCH_LANDSCAPE
#endif
#endif
#endif // HAS_SPI_TFT

View file

@ -459,11 +459,13 @@
#elif HAS_SPI_TFT // Config for Classic UI (emulated DOGM) and Color UI
#define TFT_SCK_PIN EXP2_02_PIN
#define TFT_MISO_PIN EXP2_01_PIN
#define TFT_MOSI_PIN EXP2_06_PIN
#define BTN_EN1 EXP2_03_PIN
#define BTN_EN2 EXP2_05_PIN
#define TFT_DC_PIN TFT_A0_PIN
#ifndef TFT_WIDTH
#define TFT_WIDTH 480
#endif
@ -472,10 +474,24 @@
#endif
#if ENABLED(BTT_TFT35_SPI_V1_0)
// 480x320, 3.5", SPI Display with Rotary Encoder.
// Stock Display for the BIQU B1 SE.
/**
* ------ ------
* BEEPER | 1 2 | LCD-BTN MISO | 1 2 | CLK
* T_MOSI | 3 4 | T_CS LCD-ENCA | 3 4 | TFTCS
* T_CLK | 5 6 T_MISO LCD-ENCB | 5 6 MOSI
* PENIRQ | 7 8 | F_CS RS | 7 8 | RESET
* GND | 9 10 | VCC GND | 9 10 | NC
* ------ ------
* EXP1 EXP2
*
* 480x320, 3.5", SPI Display with Rotary Encoder.
* Stock Display for the BIQU B1 SE Series.
* Schematic: https://github.com/bigtreetech/TFT35-SPI/blob/master/v1/Hardware/BTT%20TFT35-SPI%20V1-SCH.pdf
*/
#define TFT_CS_PIN EXP2_04_PIN
#define TFT_A0_PIN EXP2_07_PIN
#define TFT_DC_PIN EXP2_07_PIN
#define TFT_A0_PIN TFT_DC_PIN
#define TOUCH_CS_PIN EXP1_04_PIN
#define TOUCH_SCK_PIN EXP1_05_PIN
@ -511,7 +527,8 @@
* EXP1 EXP2
*/
#define TFT_CS_PIN EXP1_07_PIN // SPI1_CS
#define TFT_A0_PIN EXP1_08_PIN // SPI1_RS
#define TFT_DC_PIN EXP1_08_PIN // SPI1_RS
#define TFT_A0_PIN TFT_DC_PIN
#define TFT_RESET_PIN EXP1_04_PIN