Skip to content

Commit

Permalink
More #undef adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Dec 6, 2022
1 parent 2ae130d commit d259259
Show file tree
Hide file tree
Showing 10 changed files with 83 additions and 133 deletions.
2 changes: 2 additions & 0 deletions Marlin/src/pins/pins_postprocess.h
Original file line number Diff line number Diff line change
Expand Up @@ -715,6 +715,8 @@
#undef FIL_RUNOUT2_PIN
#endif

#undef LCD_PINS_DEFINED

#ifndef LCD_PINS_D4
#define LCD_PINS_D4 -1
#endif
Expand Down
27 changes: 8 additions & 19 deletions Marlin/src/pins/ramps/pins_3DRAG.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@
#define MOSFET_C_PIN 9
#define MOSFET_D_PIN 12

#define HEATER_2_PIN 6

//
// Misc. Functions
//
Expand Down Expand Up @@ -122,29 +124,13 @@
#endif
#endif

#include "pins_RAMPS.h"

//
// Heaters / Fans
//
#define HEATER_2_PIN 6

#undef SD_DETECT_PIN
#define SD_DETECT_PIN 53

//
// LCD / Controller
//
#if HAS_WIRED_LCD && IS_NEWPANEL
#undef BEEPER_PIN

// TODO: Remap EXP1/2 based on adapter
#undef LCD_PINS_RS
#undef LCD_PINS_ENABLE
#undef LCD_PINS_D4
#undef LCD_PINS_D5
#undef LCD_PINS_D6
#undef LCD_PINS_D7
#define LCD_PINS_RS 27
#define LCD_PINS_ENABLE 29
#define LCD_PINS_D4 37
Expand All @@ -153,13 +139,12 @@
#define LCD_PINS_D7 31

// Buttons
#undef BTN_EN1
#undef BTN_EN2
#undef BTN_ENC
#define BTN_EN1 16
#define BTN_EN2 17
#define BTN_ENC 23

#define LCD_PINS_DEFINED

#else

#define BEEPER_PIN 33
Expand All @@ -171,3 +156,7 @@
#define BOARD_ST7920_DELAY_2 188
#define BOARD_ST7920_DELAY_3 0
#endif

#define SD_DETECT_PIN 53

#include "pins_RAMPS.h"
31 changes: 9 additions & 22 deletions Marlin/src/pins/ramps/pins_K8600.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@
//
#define X_MIN_PIN 3
#define Y_MAX_PIN 14
#define Z_MAX_PIN 18
#define Z_MIN_PIN -1
#define Z_STOP_PIN 18

//
// Steppers
Expand All @@ -48,6 +47,7 @@
//
// Heaters / Fans
//
#define HEATER_BED_PIN -1
#define FAN_PIN 8

//
Expand All @@ -56,28 +56,11 @@
#define SDSS 25
#define CASE_LIGHT_PIN 7

//
// Other RAMPS pins
//
#include "pins_RAMPS.h"

//
// Heaters / Fans
//
#undef HEATER_BED_PIN

//
// LCD / Controller
//
#if HAS_WIRED_LCD && IS_NEWPANEL
#undef BEEPER_PIN

#undef LCD_PINS_RS
#undef LCD_PINS_ENABLE
#undef LCD_PINS_D4
#undef LCD_PINS_D5
#undef LCD_PINS_D6
#undef LCD_PINS_D7
#define LCD_PINS_RS 27
#define LCD_PINS_ENABLE 29
#define LCD_PINS_D4 37
Expand All @@ -86,15 +69,19 @@
#define LCD_PINS_D7 31

// Buttons
#undef BTN_EN1
#undef BTN_EN2
#undef BTN_ENC
#define BTN_EN1 17
#define BTN_EN2 16
#define BTN_ENC 23

#define LCD_PINS_DEFINED

#else

#define BEEPER_PIN 33

#endif

//
// Other RAMPS pins
//
#include "pins_RAMPS.h"
16 changes: 5 additions & 11 deletions Marlin/src/pins/ramps/pins_ORTUR_4.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,31 +75,25 @@
#define E0_SERIAL_RX_PIN 65
#endif

#include "pins_RAMPS.h"

//
// LCD / Controller
//
#if IS_RRD_FG_SC
#undef BEEPER_PIN
#define BEEPER_PIN 35

#undef LCD_PINS_RS
#undef LCD_PINS_ENABLE
#undef LCD_PINS_D4
#define LCD_PINS_RS 27
#define LCD_PINS_ENABLE 23
#define LCD_PINS_D4 37

#undef LCD_SDSS
#undef SD_DETECT_PIN
#define LCD_SDSS 53
#define SD_DETECT_PIN 49

#undef BTN_EN1
#undef BTN_EN2
#undef BTN_ENC
#define BTN_EN1 29
#define BTN_EN2 25
#define BTN_ENC 16

#define LCD_PINS_DEFINED

#endif

#include "pins_RAMPS.h"
2 changes: 0 additions & 2 deletions Marlin/src/pins/ramps/pins_RAMPS.h
Original file line number Diff line number Diff line change
Expand Up @@ -955,5 +955,3 @@
#define CLCD_SPI_CS EXP2_03_PIN

#endif // TOUCH_UI_FTDI_EVE && LCD_FYSETC_TFT81050

#undef LCD_DEFINED
28 changes: 7 additions & 21 deletions Marlin/src/pins/ramps/pins_ZRIB_V20.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
* V2 and V3 Boards only differ in USB controller, nothing affecting the pins.
*/

#include "pins_MKS_GEN_13.h" // ... RAMPS
#ifndef FILWIDTH_PIN
#define FILWIDTH_PIN 11 // Analog Input
#endif

//
// Auto fans
Expand All @@ -44,27 +46,7 @@
#define E3_AUTO_FAN_PIN 6
#endif

#ifndef FILWIDTH_PIN
#define FILWIDTH_PIN 11 // Analog Input
#endif

#if ENABLED(ZONESTAR_LCD)
#undef LCD_PINS_RS
#undef LCD_PINS_ENABLE
#undef LCD_PINS_D4
#undef LCD_PINS_D5
#undef LCD_PINS_D6
#undef LCD_PINS_D7
#undef ADC_KEYPAD_PIN
#undef BEEPER_PIN

#undef SHIFT_OUT_PIN
#undef SHIFT_CLK_PIN
#undef SHIFT_LD_PIN
#undef BTN_EN1
#undef BTN_EN2
#undef BTN_ENC

#define LCD_PINS_RS 16
#define LCD_PINS_ENABLE 17
#define LCD_PINS_D4 23
Expand All @@ -73,4 +55,8 @@
#define LCD_PINS_D7 29
#define ADC_KEYPAD_PIN 10 // Analog Input
#define BEEPER_PIN 37

#define LCD_PINS_DEFINED
#endif

#include "pins_MKS_GEN_13.h" // ... RAMPS
23 changes: 9 additions & 14 deletions Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,24 +42,19 @@
#define BOARD_ST7920_DELAY_3 125
#endif

#include "pins_MELZI.h" // ... SANGUINOLOLU_12 ... SANGUINOLOLU_11

//
// For the stock CR-10 enable CR10_STOCKDISPLAY in Configuration.h
//
#undef LCD_SDSS
#undef LED_PIN
#undef LCD_PINS_RS
#undef LCD_PINS_ENABLE
#undef LCD_PINS_D4
#undef LCD_PINS_D5
#undef LCD_PINS_D6
#undef LCD_PINS_D7
#if ENABLED(CR10_STOCKDISPLAY)
#define LCD_SDSS 31 // Smart Controller SD card reader (rather than the Melzi)
#define LCD_PINS_RS 28 // ST9720 CS
#define LCD_PINS_ENABLE 17 // ST9720 DAT
#define LCD_PINS_D4 30 // ST9720 CLK

#define LCD_SDSS 31 // Smart Controller SD card reader (rather than the Melzi)
#define LCD_PINS_RS 28 // ST9720 CS
#define LCD_PINS_ENABLE 17 // ST9720 DAT
#define LCD_PINS_D4 30 // ST9720 CLK
#define LCD_PINS_DEFINED
#endif

#include "pins_MELZI.h" // ... SANGUINOLOLU_12 ... SANGUINOLOLU_11

#if ENABLED(BLTOUCH)
#ifndef SERVO0_PIN
Expand Down
24 changes: 10 additions & 14 deletions Marlin/src/pins/sanguino/pins_MELZI_MALYAN.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,15 @@

#define BOARD_INFO_NAME "Melzi (Malyan)"

#include "pins_MELZI.h" // ... SANGUINOLOLU_12 ... SANGUINOLOLU_11
#if ENABLED(CR10_STOCKDISPLAY)
#define LCD_PINS_RS 17 // ST9720 CS
#define LCD_PINS_ENABLE 16 // ST9720 DAT
#define LCD_PINS_D4 11 // ST9720 CLK
#define BTN_EN1 30
#define BTN_EN2 29
#define BTN_ENC 28

#undef LCD_SDSS
#undef LCD_PINS_RS
#undef LCD_PINS_ENABLE
#undef LCD_PINS_D4
#undef BTN_EN1
#undef BTN_EN2
#undef BTN_ENC
#define LCD_PINS_DEFINED
#endif

#define LCD_PINS_RS 17 // ST9720 CS
#define LCD_PINS_ENABLE 16 // ST9720 DAT
#define LCD_PINS_D4 11 // ST9720 CLK
#define BTN_EN1 30
#define BTN_EN2 29
#define BTN_ENC 28
#include "pins_MELZI.h" // ... SANGUINOLOLU_12 ... SANGUINOLOLU_11
41 changes: 18 additions & 23 deletions Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,24 @@

#define BOARD_INFO_NAME "Melzi (Tronxy)"

#define Z_ENABLE_PIN 14

#define LCD_SDSS -1

#if ENABLED(CR10_STOCKDISPLAY)
#define LCD_PINS_RS 30
#define LCD_PINS_ENABLE 28
#define LCD_PINS_D4 16
#define LCD_PINS_D5 17
#define LCD_PINS_D6 27
#define LCD_PINS_D7 29
#define BTN_EN1 10
#define BTN_EN2 11
#define BTN_ENC 26

#define LCD_PINS_DEFINED
#endif

// Alter timing for graphical display
#if IS_U8GLIB_ST7920
#define BOARD_ST7920_DELAY_1 0
Expand All @@ -35,26 +53,3 @@
#endif

#include "pins_MELZI.h" // ... SANGUINOLOLU_12 ... SANGUINOLOLU_11

#undef Z_ENABLE_PIN
#undef LCD_PINS_RS
#undef LCD_PINS_ENABLE
#undef LCD_PINS_D4
#undef LCD_PINS_D5
#undef LCD_PINS_D6
#undef LCD_PINS_D7
#undef BTN_EN1
#undef BTN_EN2
#undef BTN_ENC
#undef LCD_SDSS

#define Z_ENABLE_PIN 14
#define LCD_PINS_RS 30
#define LCD_PINS_ENABLE 28
#define LCD_PINS_D4 16
#define LCD_PINS_D5 17
#define LCD_PINS_D6 27
#define LCD_PINS_D7 29
#define BTN_EN1 10
#define BTN_EN2 11
#define BTN_ENC 26
Loading

0 comments on commit d259259

Please sign in to comment.