Skip to content

Commit

Permalink
Linux / RAMPS
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Jul 20, 2022
1 parent 92bddff commit 42834cd
Show file tree
Hide file tree
Showing 2 changed files with 97 additions and 27 deletions.
72 changes: 64 additions & 8 deletions Marlin/src/pins/linux/pins_RAMPS_LINUX.h
Original file line number Diff line number Diff line change
Expand Up @@ -373,10 +373,71 @@
#endif
#endif

//
// AUX1 5V GND D2 D1
// 2 4 6 8
// 1 3 5 7
// 5V GND A3 A4
//
#define AUX1_05_PIN 57 // (A3)
#define AUX1_06_PIN 2
#define AUX1_07_PIN 58 // (A4)
#define AUX1_08_PIN 1

//
// AUX2 GND A9 D40 D42 A11
// 2 4 6 8 10
// 1 3 5 7 9
// VCC A5 A10 D44 A12
//
#define AUX2_03_PIN 59 // (A5)
#define AUX2_04_PIN 63 // (A9)
#define AUX2_05_PIN 64 // (A10)
#define AUX2_06_PIN 40
#define AUX2_07_PIN 44
#define AUX2_08_PIN 42
#define AUX2_09_PIN 66 // (A12)
#define AUX2_10_PIN 65 // (A11)

//
// AUX3 GND D52 D50 5V
// 7 5 3 1
// 8 6 4 2
// NC D53 D51 D49
//
#define AUX3_02_PIN 49
#define AUX3_03_PIN 50
#define AUX3_04_PIN 51
#define AUX3_05_PIN 52
#define AUX3_06_PIN 53

//
// AUX4 5V GND D32 D47 D45 D43 D41 D39 D37 D35 D33 D31 D29 D27 D25 D23 D17 D16
//
#define AUX4_03_PIN 32
#define AUX4_04_PIN 47
#define AUX4_05_PIN 45
#define AUX4_06_PIN 43
#define AUX4_07_PIN 41
#define AUX4_08_PIN 39
#define AUX4_09_PIN 37
#define AUX4_10_PIN 35
#define AUX4_11_PIN 33
#define AUX4_12_PIN 31
#define AUX4_13_PIN 29
#define AUX4_14_PIN 27
#define AUX4_15_PIN 25
#define AUX4_16_PIN 23
#define AUX4_17_PIN 17
#define AUX4_18_PIN 16

//////////////////////////
// LCDs and Controllers //
//////////////////////////

// Custom Simulator Back Button
#define BTN_BACK 70

#if ANY(TFT_COLOR_UI, TFT_CLASSIC_UI, TFT_LVGL_UI)

#define TFT_A0_PIN 43
Expand Down Expand Up @@ -453,18 +514,16 @@
#endif
#endif

#define BTN_BACK 70

#elif HAS_WIRED_LCD

//
// LCD Display output pins
//
#if ENABLED(REPRAPWORLD_GRAPHICAL_LCD)

#define LCD_PINS_RS 49 // CS chip select /SS chip slave select
#define LCD_PINS_ENABLE 51 // SID (MOSI)
#define LCD_PINS_D4 52 // SCK (CLK) clock
#define LCD_PINS_RS EXP2_07_PIN // CS chip select /SS chip slave select
#define LCD_PINS_ENABLE EXP2_06_PIN // SID (MOSI)
#define LCD_PINS_D4 EXP2_02_PIN // SCK (CLK) clock

#elif BOTH(IS_NEWPANEL, PANEL_ONE)

Expand Down Expand Up @@ -690,9 +749,6 @@
#endif
#endif

// CUSTOM SIMULATOR INPUTS
#define BTN_BACK 70

#endif // IS_NEWPANEL

#endif // HAS_WIRED_LCD
52 changes: 33 additions & 19 deletions Marlin/src/pins/ramps/pins_RAMPS.h
Original file line number Diff line number Diff line change
Expand Up @@ -594,12 +594,33 @@

#elif BOTH(IS_NEWPANEL, PANEL_ONE)

#define LCD_PINS_RS AUX2_06_PIN
#define LCD_PINS_ENABLE AUX2_08_PIN
#define LCD_PINS_D4 AUX2_10_PIN
#define LCD_PINS_D5 AUX2_09_PIN
#define LCD_PINS_D6 AUX2_07_PIN
#define LCD_PINS_D7 AUX2_05_PIN
/**
* PANEL_ONE
* ------ ------
* NC | 1 2 | NC DB4 | 1 2 | DB5
* VCC | 3 4 | ENC E | 3 4 | DB6
* MISO | 5 6 | MOSI RS | 5 6 | DB7
* SCK | 7 8 | SDSS EN2 | 7 8 | EN1
* GND | 9 10 | NC GND | 9 10 | 5V
* ------ ------
* P1 P2
*/

// Each board defines its own EXP adapters
#define EXP1_04_PIN AUX3_02_PIN // ENC
#define EXP1_05_PIN MISO
#define EXP1_06_PIN MOSI
#define EXP1_07_PIN SCK
#define EXP1_08_PIN SDSS

#define EXP2_01_PIN AUX2_10_PIN // DB4
#define EXP2_02_PIN AUX2_09_PIN // DB5
#define EXP2_03_PIN AUX2_08_PIN // ENA
#define EXP2_04_PIN AUX2_07_PIN // DB6
#define EXP2_05_PIN AUX2_06_PIN // RS
#define EXP2_06_PIN AUX2_05_PIN // DB7
#define EXP2_07_PIN AUX2_04_PIN // EN2
#define EXP2_08_PIN AUX2_03_PIN // EN1

#elif ENABLED(TFTGLCD_PANEL_SPI)

Expand All @@ -609,13 +630,7 @@

#if ENABLED(CR10_STOCKDISPLAY)

#define LCD_PINS_RS EXP1_07_PIN
#define LCD_PINS_ENABLE EXP1_08_PIN
#define LCD_PINS_D4 EXP1_06_PIN

#if !IS_NEWPANEL
#define BEEPER_PIN EXP1_01_PIN
#endif
// Moved

#elif ENABLED(ZONESTAR_LCD)

Expand Down Expand Up @@ -685,8 +700,7 @@
#define BEEPER_PIN EXP1_01_PIN

#if ENABLED(CR10_STOCKDISPLAY)
#define BTN_EN1 EXP1_03_PIN
#define BTN_EN2 EXP1_05_PIN
// Moved
#else
#define BTN_EN1 EXP2_03_PIN
#define BTN_EN2 EXP2_05_PIN
Expand All @@ -706,6 +720,8 @@

#elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD)

// TODO: Define adapters that connect to AUX ports

#define BTN_EN1 AUX2_05_PIN
#define BTN_EN2 AUX2_03_PIN
#define BTN_ENC AUX2_04_PIN
Expand Down Expand Up @@ -857,10 +873,8 @@

#define BEEPER_PIN EXP2_05_PIN

#if ENABLED(PANEL_ONE) // Buttons connect directly to AUX-2
#define BTN_EN1 AUX2_03_PIN
#define BTN_EN2 AUX2_04_PIN
#define BTN_ENC AUX3_02_PIN
#if ENABLED(PANEL_ONE) // Buttons connect directly to AUX-2
// Moved
#else
#define BTN_EN1 EXP1_01_PIN
#define BTN_EN2 EXP1_02_PIN
Expand Down

0 comments on commit 42834cd

Please sign in to comment.