Skip to content

Commit 0bc9352

Browse files
committed
♻️ Migrate LCD pins to EXP
1 parent 56f2da8 commit 0bc9352

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+786
-915
lines changed

Marlin/src/pins/linux/pins_RAMPS_LINUX.h

Lines changed: 43 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,22 @@
375375
// LCDs and Controllers //
376376
//////////////////////////
377377

378-
#if ANY(TFT_COLOR_UI, TFT_CLASSIC_UI, TFT_LVGL_UI)
378+
#if ENABLED(CR10_STOCKDISPLAY)
379+
380+
// Migrated to pins_lcd.h
381+
382+
#define EXP1_01_PIN 37
383+
#define EXP1_02_PIN 35
384+
#define EXP1_03_PIN 17
385+
#define EXP1_05_PIN 23
386+
#define EXP1_06_PIN 25
387+
#define EXP1_07_PIN 27
388+
#define EXP1_08_PIN 29
389+
390+
#define SD_DETECT_PIN 49
391+
#define KILL_PIN 41
392+
393+
#elif ANY(TFT_COLOR_UI, TFT_CLASSIC_UI, TFT_LVGL_UI)
379394

380395
#define TFT_A0_PIN 43
381396
#define TFT_CS_PIN 49
@@ -486,60 +501,37 @@
486501
#define LCD_PINS_D6 44
487502
#define LCD_PINS_D7 64
488503

489-
#else
490-
491-
#if ENABLED(CR10_STOCKDISPLAY)
504+
#elif ENABLED(ZONESTAR_LCD)
492505

493-
#define LCD_PINS_RS 27
494-
#define LCD_PINS_ENABLE 29
495-
#define LCD_PINS_D4 25
506+
#define LCD_PINS_RS 64
507+
#define LCD_PINS_ENABLE 44
508+
#define LCD_PINS_D4 63
509+
#define LCD_PINS_D5 40
510+
#define LCD_PINS_D6 42
511+
#define LCD_PINS_D7 65
496512

497-
#if !IS_NEWPANEL
498-
#define BEEPER_PIN 37
499-
#endif
500-
501-
#elif ENABLED(ZONESTAR_LCD)
502-
503-
#define LCD_PINS_RS 64
504-
#define LCD_PINS_ENABLE 44
505-
#define LCD_PINS_D4 63
506-
#define LCD_PINS_D5 40
507-
#define LCD_PINS_D6 42
508-
#define LCD_PINS_D7 65
513+
#else
509514

515+
#if EITHER(MKS_12864OLED, MKS_12864OLED_SSD1306)
516+
#define LCD_PINS_DC 25 // Set as output on init
517+
#define LCD_PINS_RS 27 // Pull low for 1s to init
518+
// DOGM SPI LCD Support
519+
#define DOGLCD_CS 16
520+
#define DOGLCD_MOSI 17
521+
#define DOGLCD_SCK 23
522+
#define DOGLCD_A0 LCD_PINS_DC
510523
#else
511-
512-
#if EITHER(MKS_12864OLED, MKS_12864OLED_SSD1306)
513-
#define LCD_PINS_DC 25 // Set as output on init
514-
#define LCD_PINS_RS 27 // Pull low for 1s to init
515-
// DOGM SPI LCD Support
516-
#define DOGLCD_CS 16
517-
#define DOGLCD_MOSI 17
518-
#define DOGLCD_SCK 23
519-
#define DOGLCD_A0 LCD_PINS_DC
520-
#else
521-
#define LCD_PINS_RS 16
522-
#define LCD_PINS_ENABLE 17
523-
#define LCD_PINS_D4 23
524-
#define LCD_PINS_D5 25
525-
#define LCD_PINS_D6 27
526-
#endif
527-
528-
#define LCD_PINS_D7 29
529-
530-
#if !IS_NEWPANEL
531-
#define BEEPER_PIN 33
532-
#endif
533-
524+
#define LCD_PINS_RS 16
525+
#define LCD_PINS_ENABLE 17
526+
#define LCD_PINS_D4 23
527+
#define LCD_PINS_D5 25
528+
#define LCD_PINS_D6 27
534529
#endif
535530

531+
#define LCD_PINS_D7 29
532+
536533
#if !IS_NEWPANEL
537-
// Buttons attached to a shift register
538-
// Not wired yet
539-
//#define SHIFT_CLK_PIN 38
540-
//#define SHIFT_LD_PIN 42
541-
//#define SHIFT_OUT_PIN 40
542-
//#define SHIFT_EN_PIN 17
534+
#define BEEPER_PIN 33
543535
#endif
544536

545537
#endif
@@ -553,15 +545,10 @@
553545

554546
#define BEEPER_PIN 37
555547

556-
#if ENABLED(CR10_STOCKDISPLAY)
557-
#define BTN_EN1 17
558-
#define BTN_EN2 23
559-
#else
560-
#define BTN_EN1 31
561-
#define BTN_EN2 33
562-
#endif
563-
564548
#define BTN_ENC 35
549+
#define BTN_EN1 31
550+
#define BTN_EN2 33
551+
565552
#define SD_DETECT_PIN 49
566553
#define KILL_PIN 41
567554

Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,11 @@
217217
#define EXP2_07_PIN P1_31
218218
#define EXP2_08_PIN -1
219219

220-
#if HAS_WIRED_LCD
220+
#if ENABLED(CR10_STOCKDISPLAY)
221+
222+
// Migrated to pins_lcd.h
223+
224+
#elif HAS_WIRED_LCD
221225
#if ENABLED(ANET_FULL_GRAPHICS_LCD_ALT_WIRING)
222226
#error "ANET_FULL_GRAPHICS_LCD_ALT_WIRING only applies to the ANET 1.0 board."
223227

@@ -291,17 +295,6 @@
291295
#define DOGLCD_MOSI EXP1_01_PIN
292296
#define LCD_BACKLIGHT_PIN -1
293297

294-
#elif ENABLED(CR10_STOCKDISPLAY)
295-
296-
#define LCD_PINS_RS EXP1_07_PIN
297-
298-
#define BTN_EN1 EXP1_03_PIN
299-
#define BTN_EN2 EXP1_05_PIN
300-
#define BTN_ENC EXP1_02_PIN // (58) open-drain
301-
302-
#define LCD_PINS_ENABLE EXP1_08_PIN
303-
#define LCD_PINS_D4 EXP1_06_PIN
304-
305298
#elif HAS_ADC_BUTTONS
306299

307300
#error "ADC BUTTONS do not work unmodified on SKR 1.3, The ADC ports cannot take more than 3.3v."

Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,11 @@
273273
#define EXP2_07_PIN P1_31
274274
#define EXP2_08_PIN -1 // RESET
275275

276-
#if HAS_DWIN_E3V2 || IS_DWIN_MARLINUI
276+
#if ENABLED(CR10_STOCKDISPLAY)
277+
278+
// Migrated to pins_lcd.h
279+
280+
#elif HAS_DWIN_E3V2 || IS_DWIN_MARLINUI
277281

278282
// RET6 DWIN ENCODER LCD
279283
#define BTN_ENC EXP1_05_PIN
@@ -357,16 +361,6 @@
357361

358362
#define BEEPER_PIN EXP1_01_PIN
359363

360-
#elif ENABLED(CR10_STOCKDISPLAY)
361-
#define LCD_PINS_RS EXP1_07_PIN
362-
363-
#define BTN_EN1 EXP1_03_PIN
364-
#define BTN_EN2 EXP1_05_PIN
365-
#define BTN_ENC EXP1_02_PIN
366-
367-
#define LCD_PINS_ENABLE EXP1_08_PIN
368-
#define LCD_PINS_D4 EXP1_06_PIN
369-
370364
#elif ENABLED(ENDER2_STOCKDISPLAY)
371365

372366
/** Creality Ender-2 display pinout

Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -276,21 +276,16 @@
276276
#error "No custom SD drive cable defined for this board."
277277
#endif
278278

279-
#if HAS_WIRED_LCD
279+
#if ENABLED(CR10_STOCKDISPLAY)
280280

281-
#define BEEPER_PIN EXP1_01_PIN
282-
#define BTN_ENC EXP1_02_PIN
283-
284-
#if ENABLED(CR10_STOCKDISPLAY)
285-
#define LCD_PINS_RS EXP1_07_PIN
281+
// Migrated to pins_lcd.h
286282

287-
#define BTN_EN1 EXP1_03_PIN
288-
#define BTN_EN2 EXP1_05_PIN
283+
#elif HAS_WIRED_LCD
289284

290-
#define LCD_PINS_ENABLE EXP1_08_PIN
291-
#define LCD_PINS_D4 EXP1_06_PIN
285+
#define BEEPER_PIN EXP1_01_PIN
286+
#define BTN_ENC EXP1_02_PIN
292287

293-
#elif HAS_SPI_TFT // Config for Classic UI (emulated DOGM) and Color UI
288+
#if HAS_SPI_TFT // Config for Classic UI (emulated DOGM) and Color UI
294289
#define TFT_CS_PIN EXP1_07_PIN
295290
#define TFT_A0_PIN EXP1_08_PIN
296291
#define TFT_DC_PIN EXP1_08_PIN

Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -290,14 +290,13 @@
290290
#if ENABLED(CR10_STOCKDISPLAY)
291291

292292
// Re-Arm can support Creality stock display without SD card reader and single cable on EXP3.
293-
// Re-Arm J3 pins 1 (p1.31) & 2 (P3.26) are not used. Stock cable will need to have one
293+
// Re-Arm J3 pins 1 (P1.31) & 2 (P3.26) are not used. Stock cable will need to have one
294294
// 10-pin IDC connector trimmed or replaced with a 12-pin IDC connector to fit J3.
295-
// Requires REVERSE_ENCODER_DIRECTION in Configuration.h
296295

297296
#define BEEPER_PIN P2_11 // J3-3 & AUX-4
298297

299-
#define BTN_EN1 P0_16 // J3-7 & AUX-4
300-
#define BTN_EN2 P1_23 // J3-5 & AUX-4
298+
#define BTN_EN1 P1_23 // J3-5 & AUX-4
299+
#define BTN_EN2 P0_16 // J3-7 & AUX-4
301300
#define BTN_ENC P3_25 // J3-4 & AUX-4
302301

303302
#define LCD_PINS_RS P0_15 // J3-9 & AUX-4 (CS)

Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@
108108
//
109109
// Display
110110
//
111-
112111
#if EITHER(VIKI2, miniVIKI)
113112
#define BEEPER_PIN P1_31
114113
#define DOGLCD_A0 P2_06

0 commit comments

Comments
 (0)