Skip to content

Commit

Permalink
♻️ Migrate IS_RRD_SC
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Apr 8, 2023
1 parent f021f5a commit 3156275
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 38 deletions.
26 changes: 26 additions & 0 deletions Marlin/src/pins/pins_lcd.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,32 @@

#endif

#elif IS_RRD_SC && !defined(LCD_PINS_ENABLE)

#ifndef BEEPER_PIN
#define BEEPER_PIN EXP1_01_PIN
#endif

#define LCD_PINS_ENABLE EXP1_03_PIN
#define LCD_PINS_RS EXP1_04_PIN
#define LCD_PINS_D4 EXP1_05_PIN
#define LCD_PINS_D5 EXP1_06_PIN
#define LCD_PINS_D6 EXP1_07_PIN
#define LCD_PINS_D7 EXP1_08_PIN

#if IS_NEWPANEL
#define BTN_ENC EXP1_02_PIN
#define BTN_EN1 EXP2_03_PIN
#define BTN_EN2 EXP2_05_PIN

#ifndef SD_DETECT_PIN
#define SD_DETECT_PIN EXP2_07_PIN
#endif
#ifndef KILL_PIN
#define KILL_PIN EXP2_08_PIN
#endif
#endif

#else

// More displays to come
Expand Down
25 changes: 6 additions & 19 deletions Marlin/src/pins/ramps/pins_RAMPS.h
Original file line number Diff line number Diff line change
Expand Up @@ -638,20 +638,18 @@
#if EITHER(MKS_12864OLED, MKS_12864OLED_SSD1306)
#define LCD_PINS_DC EXP1_06_PIN // Set as output on init
#define LCD_PINS_RS EXP1_07_PIN // Pull low for 1s to init
#define LCD_PINS_D7 EXP1_08_PIN
// DOGM SPI LCD Support
#define DOGLCD_A0 LCD_PINS_DC
#define DOGLCD_CS EXP1_04_PIN
#define DOGLCD_MOSI EXP1_03_PIN
#define DOGLCD_SCK EXP1_05_PIN
#else
#define LCD_PINS_RS EXP1_04_PIN
#define LCD_PINS_ENABLE EXP1_03_PIN
#define LCD_PINS_D4 EXP1_05_PIN
#define LCD_PINS_D5 EXP1_06_PIN
#define LCD_PINS_D6 EXP1_07_PIN
#endif

#define LCD_PINS_D7 EXP1_08_PIN
// Migrated to pins_lcd.h
#define IS_RRD_SC

#endif

#if !IS_NEWPANEL
#define BEEPER_PIN EXP2_05_PIN
Expand Down Expand Up @@ -681,18 +679,7 @@

#if IS_RRD_SC

#define BEEPER_PIN EXP1_01_PIN

#define BTN_ENC EXP1_02_PIN
#define BTN_EN1 EXP2_03_PIN
#define BTN_EN2 EXP2_05_PIN

#ifndef SD_DETECT_PIN
#define SD_DETECT_PIN EXP2_07_PIN
#endif
#ifndef KILL_PIN
#define KILL_PIN EXP2_08_PIN
#endif
// Migrated to pins_lcd.h

#if ENABLED(BQ_LCD_SMART_CONTROLLER)
#define LCD_BACKLIGHT_PIN AUX4_08
Expand Down
25 changes: 6 additions & 19 deletions Marlin/src/pins/samd/pins_RAMPS_144.h
Original file line number Diff line number Diff line change
Expand Up @@ -441,20 +441,18 @@
#if EITHER(MKS_12864OLED, MKS_12864OLED_SSD1306)
#define LCD_PINS_DC EXP1_06_PIN // Set as output on init
#define LCD_PINS_RS EXP1_07_PIN // Pull low for 1s to init
#define LCD_PINS_D7 EXP1_08_PIN
// DOGM SPI LCD Support
#define DOGLCD_A0 LCD_PINS_DC
#define DOGLCD_CS EXP1_04_PIN
#define DOGLCD_MOSI EXP1_03_PIN
#define DOGLCD_SCK EXP1_05_PIN
#else
#define LCD_PINS_RS EXP1_04_PIN
#define LCD_PINS_ENABLE EXP1_03_PIN
#define LCD_PINS_D4 EXP1_05_PIN
#define LCD_PINS_D5 EXP1_06_PIN
#define LCD_PINS_D6 EXP1_07_PIN
#endif

#define LCD_PINS_D7 EXP1_08_PIN
// Migrated to pins_lcd.h
#define IS_RRD_SC

#endif

#if !IS_NEWPANEL
#define BEEPER_PIN EXP2_05_PIN
Expand Down Expand Up @@ -484,18 +482,7 @@

#if IS_RRD_SC

#define BEEPER_PIN EXP1_01_PIN

#define BTN_ENC EXP1_02_PIN
#define BTN_EN1 EXP2_03_PIN
#define BTN_EN2 EXP2_05_PIN

#ifndef SD_DETECT_PIN
#define SD_DETECT_PIN EXP2_07_PIN
#endif
#ifndef KILL_PIN
#define KILL_PIN EXP2_08_PIN
#endif
// Migrated to pins_lcd.h

#if ENABLED(BQ_LCD_SMART_CONTROLLER)
#define LCD_BACKLIGHT_PIN AUX4_08
Expand Down

0 comments on commit 3156275

Please sign in to comment.