Skip to content

Commit

Permalink
🚸 Renumber EXP pins to match schematics/RRF/Klipper
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead authored and LCh-77 committed Jul 19, 2022
1 parent 1f65399 commit 2df9409
Show file tree
Hide file tree
Showing 53 changed files with 2,604 additions and 2,606 deletions.
86 changes: 43 additions & 43 deletions Marlin/src/pins/esp32/pins_MKS_TINYBEE.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,72 +119,72 @@

/**
* ------ ------
* (BEEPER) 149 |10 9 | 13 (BTN_ENC) (SPI MISO) 19 |10 9 | 18 (SPI SCK)
* (LCD_EN) 21 | 8 7 | 4 (LCD_RS) (BTN_EN1) 14 | 8 7 | 5 (SPI CS)
* (LCD_D4) 0 6 5 | 16 (LCD_D5) (BTN_EN2) 12 6 5 | 23 (SPI MOSI)
* (LCD_D6) 15 | 4 3 | 17 (LCD_D7) (SPI_DET) 34 | 4 3 | RESET
* GND | 2 1 | 5V GND | 2 1 | 3.3V
* (BEEPER) 149 | 1 2 | 13 (BTN_ENC) (SPI MISO) 19 | 1 2 | 18 (SPI SCK)
* (LCD_EN) 21 | 3 4 | 4 (LCD_RS) (BTN_EN1) 14 | 3 4 | 5 (SPI CS)
* (LCD_D4) 0 5 6 | 16 (LCD_D5) (BTN_EN2) 12 5 6 | 23 (SPI MOSI)
* (LCD_D6) 15 | 7 8 | 17 (LCD_D7) (SPI_DET) 34 | 7 8 | RESET
* GND | 9 10 | 5V GND | 9 10 | 3.3V
* ------ ------
* EXP1 EXP2
*/

#define EXP1_03_PIN 17
#define EXP1_04_PIN 15
#define EXP1_05_PIN 16
#define EXP1_06_PIN 0
#define EXP1_07_PIN 4
#define EXP1_08_PIN 21
#define EXP1_09_PIN 13
#define EXP1_10_PIN 149

#define EXP2_03_PIN -1 // RESET
#define EXP2_04_PIN 34
#define EXP2_05_PIN 23
#define EXP2_06_PIN 12
#define EXP2_07_PIN 5
#define EXP2_08_PIN 14
#define EXP2_09_PIN 18
#define EXP2_10_PIN 19
#define EXP1_08_PIN 17
#define EXP1_07_PIN 15
#define EXP1_06_PIN 16
#define EXP1_05_PIN 0
#define EXP1_04_PIN 4
#define EXP1_03_PIN 21
#define EXP1_02_PIN 13
#define EXP1_01_PIN 149

#define EXP2_08_PIN -1 // RESET
#define EXP2_07_PIN 34
#define EXP2_06_PIN 23
#define EXP2_05_PIN 12
#define EXP2_04_PIN 5
#define EXP2_03_PIN 14
#define EXP2_02_PIN 18
#define EXP2_01_PIN 19

//
// MicroSD card
//
//#define SD_MOSI_PIN EXP2_05_PIN // uses esp32 default 23
//#define SD_MISO_PIN EXP2_10_PIN // uses esp32 default 19
//#define SD_SCK_PIN EXP2_09_PIN // uses esp32 default 18
#define SDSS EXP2_07_PIN
#define SD_DETECT_PIN EXP2_04_PIN // IO34 default is SD_DET signal (Jump to SDDET)
//#define SD_MOSI_PIN EXP2_06_PIN // uses esp32 default 23
//#define SD_MISO_PIN EXP2_01_PIN // uses esp32 default 19
//#define SD_SCK_PIN EXP2_02_PIN // uses esp32 default 18
#define SDSS EXP2_04_PIN
#define SD_DETECT_PIN EXP2_07_PIN // IO34 default is SD_DET signal (Jump to SDDET)
#define USES_SHARED_SPI // SPI is shared by SD card with TMC SPI drivers

#if HAS_WIRED_LCD
#define BEEPER_PIN EXP1_10_PIN
#define LCD_PINS_ENABLE EXP1_08_PIN
#define LCD_PINS_RS EXP1_07_PIN
#define BTN_ENC EXP1_09_PIN
#define BTN_EN1 EXP2_08_PIN
#define BTN_EN2 EXP2_06_PIN
#define BEEPER_PIN EXP1_01_PIN
#define LCD_PINS_ENABLE EXP1_03_PIN
#define LCD_PINS_RS EXP1_04_PIN
#define BTN_ENC EXP1_02_PIN
#define BTN_EN1 EXP2_03_PIN
#define BTN_EN2 EXP2_05_PIN
#define LCD_BACKLIGHT_PIN -1

#if ENABLED(MKS_MINI_12864)
// MKS MINI12864 and MKS LCD12864B; If using MKS LCD12864A (Need to remove RPK2 resistor)
#define DOGLCD_CS EXP1_05_PIN
#define DOGLCD_A0 EXP1_04_PIN
#define DOGLCD_CS EXP1_06_PIN
#define DOGLCD_A0 EXP1_07_PIN
#define LCD_RESET_PIN -1
#elif ENABLED(FYSETC_MINI_12864_2_1)
// MKS_MINI_12864_V3, BTT_MINI_12864_V1, FYSETC_MINI_12864_2_1
#define DOGLCD_CS EXP1_08_PIN
#define DOGLCD_A0 EXP1_07_PIN
#define LCD_RESET_PIN EXP1_06_PIN
#define NEOPIXEL_PIN EXP1_05_PIN
#define DOGLCD_CS EXP1_03_PIN
#define DOGLCD_A0 EXP1_04_PIN
#define LCD_RESET_PIN EXP1_05_PIN
#define NEOPIXEL_PIN EXP1_06_PIN
#if SD_CONNECTION_IS(ONBOARD)
#define FORCE_SOFT_SPI
#endif
#else
#define LCD_PINS_D4 EXP1_06_PIN
#define LCD_PINS_D4 EXP1_05_PIN
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#define LCD_PINS_D5 EXP1_05_PIN
#define LCD_PINS_D6 EXP1_04_PIN
#define LCD_PINS_D7 EXP1_03_PIN
#define LCD_PINS_D5 EXP1_06_PIN
#define LCD_PINS_D6 EXP1_07_PIN
#define LCD_PINS_D7 EXP1_08_PIN
#endif
#define BOARD_ST7920_DELAY_1 96
#define BOARD_ST7920_DELAY_2 48
Expand Down
60 changes: 30 additions & 30 deletions Marlin/src/pins/esp32/pins_PANDA_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,47 +82,47 @@
#endif

/** ------ ------
* (MISO 19?) |10 9 | (18 SCK?) (BEEPER) 129 |10 9 | 12 (^ENC)
* (EN1) 33 | 8 7 | (5 SDSS?) (EN) 26 | 8 7 | 27 (RS)
* (EN2) 32 6 5 | (23 MOSI?) (D4) 14 | 6 5 --
* (SDDET 2?) | 4 3 | (RESET) -- | 4 3 | --
* -- | 2 1 | -- (GND) | 2 1 | (5V)
* (MISO 19?) | 1 2 | (18 SCK?) (BEEPER) 129 | 1 2 | 12 (^ENC)
* (EN1) 33 | 3 4 | (5 SDSS?) (EN) 26 | 3 4 | 27 (RS)
* (EN2) 32 5 6 | (23 MOSI?) (D4) 14 | 5 6 --
* (SDDET 2?) | 7 8 | (RESET) -- | 7 8 | --
* -- | 9 10 | -- (GND) | 9 10 | (5V)
* ------ ------
* EXP2 EXP1
*/
#define EXP1_06_PIN 14
#define EXP1_07_PIN 27
#define EXP1_08_PIN 26
#define EXP1_09_PIN 12
#define EXP1_10_PIN 129

#define EXP2_04_PIN 2 // ?
#define EXP2_05_PIN 23 // ?
#define EXP2_06_PIN 32
#define EXP2_07_PIN 5 // ?
#define EXP2_08_PIN 33
#define EXP2_09_PIN 18 // ?
#define EXP2_10_PIN 19 // ?
#define EXP1_05_PIN 14
#define EXP1_04_PIN 27
#define EXP1_03_PIN 26
#define EXP1_02_PIN 12
#define EXP1_01_PIN 129

#define EXP2_07_PIN 2 // ?
#define EXP2_06_PIN 23 // ?
#define EXP2_05_PIN 32
#define EXP2_04_PIN 5 // ?
#define EXP2_03_PIN 33
#define EXP2_02_PIN 18 // ?
#define EXP2_01_PIN 19 // ?

//
// SD Card
//
#if ENABLED(SDSUPPORT)
#define SD_MOSI_PIN EXP2_05_PIN
#define SD_MISO_PIN EXP2_10_PIN
#define SD_SCK_PIN EXP2_09_PIN
#define SDSS EXP2_07_PIN
#define SD_DETECT_PIN EXP2_04_PIN
#define SD_MOSI_PIN EXP2_06_PIN
#define SD_MISO_PIN EXP2_01_PIN
#define SD_SCK_PIN EXP2_02_PIN
#define SDSS EXP2_04_PIN
#define SD_DETECT_PIN EXP2_07_PIN
#endif

#if HAS_WIRED_LCD
#define BEEPER_PIN EXP1_10_PIN
#define BEEPER_PIN EXP1_01_PIN

#define BTN_ENC EXP1_09_PIN
#define BTN_EN1 EXP2_08_PIN
#define BTN_EN2 EXP2_06_PIN
#define BTN_ENC EXP1_02_PIN
#define BTN_EN1 EXP2_03_PIN
#define BTN_EN2 EXP2_05_PIN

#define LCD_PINS_RS EXP1_07_PIN
#define LCD_PINS_ENABLE EXP1_08_PIN
#define LCD_PINS_D4 EXP1_06_PIN
#define LCD_PINS_RS EXP1_04_PIN
#define LCD_PINS_ENABLE EXP1_03_PIN
#define LCD_PINS_D4 EXP1_05_PIN
#endif
82 changes: 41 additions & 41 deletions Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,31 +58,31 @@


/** ------ ------
* 1.30 |10 9 | 2.11 0.17 |10 9 | 0.15
* 0.18 | 8 7 | 0.16 3.26 | 8 7 | 1.23
* 0.15 6 5 | -- 3.25 6 5 | 0.18
* -- | 4 3 | -- 1.31 | 4 3 | RESET
* GND | 2 1 | 5V GND | 2 1 | --
* 1.30 | 1 2 | 2.11 0.17 | 1 2 | 0.15
* 0.18 | 3 4 | 0.16 3.26 | 3 4 | 1.23
* 0.15 5 6 | -- 3.25 5 6 | 0.18
* -- | 7 8 | -- 1.31 | 7 8 | RESET
* GND | 9 10 | 5V GND | 9 10 | --
* ------ ------
* EXP1 EXP2
*/
#define EXP1_03_PIN -1 // NC
#define EXP1_04_PIN -1 // NC
#define EXP1_05_PIN -1 // NC
#define EXP1_06_PIN P0_15
#define EXP1_07_PIN P0_16
#define EXP1_08_PIN P0_18
#define EXP1_09_PIN P2_11
#define EXP1_10_PIN P1_30

#define EXP2_03_PIN -1 // RESET
#define EXP2_04_PIN P1_31
#define EXP2_05_PIN P0_18
#define EXP2_06_PIN P3_25
#define EXP2_07_PIN P1_23
#define EXP2_08_PIN P3_26
#define EXP2_09_PIN P0_15
#define EXP2_10_PIN P0_17
#define EXP1_08_PIN -1 // NC
#define EXP1_07_PIN -1 // NC
#define EXP1_06_PIN -1 // NC
#define EXP1_05_PIN P0_15
#define EXP1_04_PIN P0_16
#define EXP1_03_PIN P0_18
#define EXP1_02_PIN P2_11
#define EXP1_01_PIN P1_30

#define EXP2_08_PIN -1 // RESET
#define EXP2_07_PIN P1_31
#define EXP2_06_PIN P0_18
#define EXP2_05_PIN P3_25
#define EXP2_04_PIN P1_23
#define EXP2_03_PIN P3_26
#define EXP2_02_PIN P0_15
#define EXP2_01_PIN P0_17

/**
* LCD / Controller
Expand All @@ -100,23 +100,23 @@
#if IS_TFTGLCD_PANEL

#if ENABLED(TFTGLCD_PANEL_SPI)
#define TFTGLCD_CS EXP2_08_PIN
#define TFTGLCD_CS EXP2_03_PIN
#endif

#elif HAS_WIRED_LCD

#define BTN_EN1 EXP2_08_PIN
#define BTN_EN2 EXP2_06_PIN
#define BTN_ENC EXP1_09_PIN
#define BTN_EN1 EXP2_03_PIN
#define BTN_EN2 EXP2_05_PIN
#define BTN_ENC EXP1_02_PIN

#define LCD_SDSS EXP2_07_PIN
#define LCD_PINS_RS EXP1_07_PIN
#define LCD_PINS_ENABLE EXP2_05_PIN
#define LCD_PINS_D4 EXP2_09_PIN
#define LCD_SDSS EXP2_04_PIN
#define LCD_PINS_RS EXP1_04_PIN
#define LCD_PINS_ENABLE EXP2_06_PIN
#define LCD_PINS_D4 EXP2_02_PIN

#if ENABLED(MKS_MINI_12864)
#define DOGLCD_CS P2_06
#define DOGLCD_A0 EXP1_07_PIN
#define DOGLCD_A0 EXP1_04_PIN
#endif

#endif // HAS_WIRED_LCD
Expand Down Expand Up @@ -165,10 +165,10 @@
// When using any TMC SPI-based drivers, software SPI is used
// because pins may be shared with the display or SD card.
#define TMC_USE_SW_SPI
#define TMC_SW_MOSI EXP2_05_PIN
#define TMC_SW_MISO EXP2_10_PIN
#define TMC_SW_MOSI EXP2_06_PIN
#define TMC_SW_MISO EXP2_01_PIN
// To minimize pin usage use the same clock pin as the display/SD card reader. (May generate LCD noise.)
#define TMC_SW_SCK EXP2_09_PIN
#define TMC_SW_SCK EXP2_02_PIN
// If pin 2_06 is unused, it can be used for the clock to avoid the LCD noise.
//#define TMC_SW_SCK P2_06

Expand Down Expand Up @@ -211,11 +211,11 @@
// SDCARD_CONNECTION must not be 'LCD'. Nothing should be connected to EXP1/EXP2.
//#define SKR_USE_LCD_PINS_FOR_CS
#if ENABLED(SKR_USE_LCD_PINS_FOR_CS)
#define X_CS_PIN EXP2_07_PIN
#define Y_CS_PIN EXP2_08_PIN
#define Z_CS_PIN EXP1_09_PIN
#define E0_CS_PIN EXP2_06_PIN
#define E1_CS_PIN EXP2_04_PIN
#define X_CS_PIN EXP2_04_PIN
#define Y_CS_PIN EXP2_03_PIN
#define Z_CS_PIN EXP1_02_PIN
#define E0_CS_PIN EXP2_05_PIN
#define E1_CS_PIN EXP2_07_PIN
#endif

// Example 2: A REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
Expand All @@ -228,11 +228,11 @@
#define Z_CS_PIN P2_06
// We use SD_DETECT_PIN for E0
#undef SD_DETECT_PIN
#define E0_CS_PIN EXP2_04_PIN
#define E0_CS_PIN EXP2_07_PIN
// We use LCD_SDSS pin for E1
#undef LCD_SDSS
#define LCD_SDSS -1
#define E1_CS_PIN EXP2_07_PIN
#define E1_CS_PIN EXP2_04_PIN
#endif

// Example 3: Use the driver enable pins for chip-select.
Expand Down
Loading

0 comments on commit 2df9409

Please sign in to comment.