Skip to content

Commit 41aa6c0

Browse files
committed
Revert "🩹 Fix SPI TFT build on SKR V2 & V3/EZ (MarlinFirmware#26041)"
This reverts commit fef772e.
1 parent 11f98ad commit 41aa6c0

File tree

6 files changed

+19
-115
lines changed

6 files changed

+19
-115
lines changed

Marlin/src/pins/linux/pins_RAMPS_LINUX.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -377,9 +377,9 @@
377377

378378
#if ANY(TFT_COLOR_UI, TFT_CLASSIC_UI, TFT_LVGL_UI)
379379

380+
#define TFT_A0_PIN 43
380381
#define TFT_CS_PIN 49
381382
#define TFT_DC_PIN 43
382-
#define TFT_A0_PIN TFT_DC_PIN
383383
#define TFT_SCK_PIN SD_SCK_PIN
384384
#define TFT_MISO_PIN SD_MISO_PIN
385385
#define TFT_MOSI_PIN SD_MOSI_PIN

Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h

+5-27
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@
319319
#define BTN_EN1 EXP2_03_PIN
320320
#define BTN_EN2 EXP2_05_PIN
321321

322-
#define TFT_A0_PIN TFT_DC_PIN
322+
#define TFT_DC_PIN TFT_A0_PIN
323323

324324
#ifndef TFT_WIDTH
325325
#define TFT_WIDTH 480
@@ -329,23 +329,10 @@
329329
#endif
330330

331331
#if ENABLED(BTT_TFT35_SPI_V1_0)
332-
333-
/**
334-
* ------ ------
335-
* BEEPER | 1 2 | LCD-BTN MISO | 1 2 | CLK
336-
* T_MOSI | 3 4 | T_CS LCD-ENCA | 3 4 | TFTCS
337-
* T_CLK | 5 6 T_MISO LCD-ENCB | 5 6 MOSI
338-
* PENIRQ | 7 8 | F_CS RS | 7 8 | RESET
339-
* GND | 9 10 | VCC GND | 9 10 | NC
340-
* ------ ------
341-
* EXP1 EXP2
342-
*
343-
* 480x320, 3.5", SPI Display with Rotary Encoder.
344-
* Stock Display for the BIQU B1 SE Series.
345-
* Schematic: https://github.com/bigtreetech/TFT35-SPI/blob/master/v1/Hardware/BTT%20TFT35-SPI%20V1-SCH.pdf
346-
*/
332+
// 480x320, 3.5", SPI Display with Rotary Encoder.
333+
// Stock Display for the BIQU B1 SE.
347334
#define TFT_CS_PIN EXP2_04_PIN
348-
#define TFT_DC_PIN EXP2_07_PIN
335+
#define TFT_A0_PIN EXP2_07_PIN
349336

350337
#define TOUCH_CS_PIN EXP1_04_PIN
351338
#define TOUCH_SCK_PIN EXP1_05_PIN
@@ -355,17 +342,8 @@
355342

356343
#elif ENABLED(MKS_TS35_V2_0)
357344

358-
/** ------ ------
359-
* BEEPER | 1 2 | BTN_ENC SPI1_MISO | 1 2 | SPI1_SCK
360-
* TFT_BKL / LCD_EN | 3 4 | TFT_RESET / LCD_RS BTN_EN1 | 3 4 | SPI1_CS
361-
* TOUCH_CS / LCD_D4 | 5 6 TOUCH_INT / LCD_D5 BTN_EN2 | 5 6 SPI1_MOSI
362-
* SPI1_CS / LCD_D6 | 7 8 | SPI1_RS / LCD_D7 SPI1_RS | 7 8 | RESET
363-
* GND | 9 10 | VCC GND | 9 10 | VCC
364-
* ------ ------
365-
* EXP1 EXP2
366-
*/
367345
#define TFT_CS_PIN EXP1_07_PIN
368-
#define TFT_DC_PIN EXP1_08_PIN
346+
#define TFT_A0_PIN EXP1_08_PIN
369347

370348
#define TFT_RESET_PIN EXP1_04_PIN
371349

Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -396,8 +396,8 @@
396396

397397
#elif HAS_SPI_TFT // Config for Classic UI (emulated DOGM) and Color UI
398398
#define TFT_CS_PIN EXP1_07_PIN
399+
#define TFT_A0_PIN EXP1_08_PIN
399400
#define TFT_DC_PIN EXP1_08_PIN
400-
#define TFT_A0_PIN TFT_DC_PIN
401401
#define TFT_MISO_PIN EXP2_01_PIN
402402
#define TFT_BACKLIGHT_PIN EXP1_03_PIN
403403
#define TFT_RESET_PIN EXP1_04_PIN

Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,8 @@
295295

296296
#elif HAS_SPI_TFT // Config for Classic UI (emulated DOGM) and Color UI
297297
#define TFT_CS_PIN EXP1_07_PIN
298+
#define TFT_A0_PIN EXP1_08_PIN
298299
#define TFT_DC_PIN EXP1_08_PIN
299-
#define TFT_A0_PIN TFT_DC_PIN
300300
#define TFT_MISO_PIN EXP2_01_PIN
301301
#define TFT_BACKLIGHT_PIN EXP1_03_PIN
302302
#define TFT_RESET_PIN EXP1_04_PIN

Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h

+5-62
Original file line numberDiff line numberDiff line change
@@ -514,63 +514,22 @@
514514

515515
#if HAS_SPI_TFT
516516

517-
#define TFT_SCK_PIN EXP2_02_PIN
518-
#define TFT_MISO_PIN EXP2_01_PIN
519-
#define TFT_MOSI_PIN EXP2_06_PIN
520-
521517
#define BTN_ENC EXP1_02_PIN
522518
#define BTN_EN1 EXP2_03_PIN
523519
#define BTN_EN2 EXP2_05_PIN
524520

525-
#ifndef TFT_WIDTH
526-
#define TFT_WIDTH 480
527-
#endif
528-
#ifndef TFT_HEIGHT
529-
#define TFT_HEIGHT 320
530-
#endif
531-
532521
#if ENABLED(BTT_TFT35_SPI_V1_0)
533-
534-
/**
535-
* ------ ------
536-
* BEEPER | 1 2 | LCD-BTN MISO | 1 2 | CLK
537-
* T_MOSI | 3 4 | T_CS LCD-ENCA | 3 4 | TFTCS
538-
* T_CLK | 5 6 T_MISO LCD-ENCB | 5 6 MOSI
539-
* PENIRQ | 7 8 | F_CS RS | 7 8 | RESET
540-
* GND | 9 10 | VCC GND | 9 10 | NC
541-
* ------ ------
542-
* EXP1 EXP2
543-
*
544-
* 480x320, 3.5", SPI Display with Rotary Encoder.
545-
* Stock Display for the BIQU B1 SE Series.
546-
* Schematic: https://github.com/bigtreetech/TFT35-SPI/blob/master/v1/Hardware/BTT%20TFT35-SPI%20V1-SCH.pdf
547-
*/
522+
// 480x320, 3.5", SPI Display with Rotary Encoder.
523+
// Stock Display for the BIQU B1 SE.
548524
#define TFT_CS_PIN EXP2_04_PIN
549-
#define TFT_DC_PIN EXP2_07_PIN
550-
#define TFT_A0_PIN TFT_DC_PIN
525+
#define TFT_A0_PIN EXP2_07_PIN
551526

552527
#define TOUCH_CS_PIN EXP1_04_PIN
553528
#define TOUCH_SCK_PIN EXP1_05_PIN
554529
#define TOUCH_MISO_PIN EXP1_06_PIN
555530
#define TOUCH_MOSI_PIN EXP1_03_PIN
556531
#define TOUCH_INT_PIN EXP1_07_PIN
557532

558-
#ifndef TOUCH_CALIBRATION_X
559-
#define TOUCH_CALIBRATION_X 17540
560-
#endif
561-
#ifndef TOUCH_CALIBRATION_Y
562-
#define TOUCH_CALIBRATION_Y -11388
563-
#endif
564-
#ifndef TOUCH_OFFSET_X
565-
#define TOUCH_OFFSET_X -21
566-
#endif
567-
#ifndef TOUCH_OFFSET_Y
568-
#define TOUCH_OFFSET_Y 337
569-
#endif
570-
#ifndef TOUCH_ORIENTATION
571-
#define TOUCH_ORIENTATION TOUCH_LANDSCAPE
572-
#endif
573-
574533
#elif ENABLED(MKS_TS35_V2_0)
575534

576535
/** ------ ------
@@ -583,8 +542,8 @@
583542
* EXP1 EXP2
584543
*/
585544
#define TFT_CS_PIN EXP1_07_PIN // SPI1_CS
586-
#define TFT_DC_PIN EXP1_08_PIN // SPI1_RS
587-
#define TFT_A0_PIN TFT_DC_PIN
545+
#define TFT_A0_PIN EXP1_08_PIN // SPI1_RS
546+
#define TFT_DC_PIN TFT_DC_PIN
588547

589548
#define TFT_RESET_PIN EXP1_04_PIN
590549

@@ -604,22 +563,6 @@
604563

605564
#define TFT_BUFFER_WORDS 14400
606565

607-
#ifndef TOUCH_CALIBRATION_X
608-
#define TOUCH_CALIBRATION_X -17253
609-
#endif
610-
#ifndef TOUCH_CALIBRATION_Y
611-
#define TOUCH_CALIBRATION_Y 11579
612-
#endif
613-
#ifndef TOUCH_OFFSET_X
614-
#define TOUCH_OFFSET_X 514
615-
#endif
616-
#ifndef TOUCH_OFFSET_Y
617-
#define TOUCH_OFFSET_Y -24
618-
#endif
619-
#ifndef TOUCH_ORIENTATION
620-
#define TOUCH_ORIENTATION TOUCH_LANDSCAPE
621-
#endif
622-
623566
#endif
624567

625568
#endif // HAS_SPI_TFT

Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h

+6-23
Original file line numberDiff line numberDiff line change
@@ -459,13 +459,11 @@
459459

460460
#elif HAS_SPI_TFT // Config for Classic UI (emulated DOGM) and Color UI
461461

462-
#define TFT_SCK_PIN EXP2_02_PIN
463-
#define TFT_MISO_PIN EXP2_01_PIN
464-
#define TFT_MOSI_PIN EXP2_06_PIN
465-
466462
#define BTN_EN1 EXP2_03_PIN
467463
#define BTN_EN2 EXP2_05_PIN
468464

465+
#define TFT_DC_PIN TFT_A0_PIN
466+
469467
#ifndef TFT_WIDTH
470468
#define TFT_WIDTH 480
471469
#endif
@@ -474,24 +472,10 @@
474472
#endif
475473

476474
#if ENABLED(BTT_TFT35_SPI_V1_0)
477-
478-
/**
479-
* ------ ------
480-
* BEEPER | 1 2 | LCD-BTN MISO | 1 2 | CLK
481-
* T_MOSI | 3 4 | T_CS LCD-ENCA | 3 4 | TFTCS
482-
* T_CLK | 5 6 T_MISO LCD-ENCB | 5 6 MOSI
483-
* PENIRQ | 7 8 | F_CS RS | 7 8 | RESET
484-
* GND | 9 10 | VCC GND | 9 10 | NC
485-
* ------ ------
486-
* EXP1 EXP2
487-
*
488-
* 480x320, 3.5", SPI Display with Rotary Encoder.
489-
* Stock Display for the BIQU B1 SE Series.
490-
* Schematic: https://github.com/bigtreetech/TFT35-SPI/blob/master/v1/Hardware/BTT%20TFT35-SPI%20V1-SCH.pdf
491-
*/
475+
// 480x320, 3.5", SPI Display with Rotary Encoder.
476+
// Stock Display for the BIQU B1 SE.
492477
#define TFT_CS_PIN EXP2_04_PIN
493-
#define TFT_DC_PIN EXP2_07_PIN
494-
#define TFT_A0_PIN TFT_DC_PIN
478+
#define TFT_A0_PIN EXP2_07_PIN
495479

496480
#define TOUCH_CS_PIN EXP1_04_PIN
497481
#define TOUCH_SCK_PIN EXP1_05_PIN
@@ -527,8 +511,7 @@
527511
* EXP1 EXP2
528512
*/
529513
#define TFT_CS_PIN EXP1_07_PIN // SPI1_CS
530-
#define TFT_DC_PIN EXP1_08_PIN // SPI1_RS
531-
#define TFT_A0_PIN TFT_DC_PIN
514+
#define TFT_A0_PIN EXP1_08_PIN // SPI1_RS
532515

533516
#define TFT_RESET_PIN EXP1_04_PIN
534517

0 commit comments

Comments
 (0)