Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pins cleanup, define some EXP1/2 #22628

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Marlin/src/HAL/STM32F1/onboard_sd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ static void sd_power_on() {
ONBOARD_SD_SPI.begin();
ONBOARD_SD_SPI.setBitOrder(MSBFIRST);
ONBOARD_SD_SPI.setDataMode(SPI_MODE0);
OUT_WRITE(ONBOARD_SD_CS_PIN, HIGH); // Set CS# high
CS_HIGH();
}

// Disable SPI function
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@
#define FAN1_PIN P0_26

#define LCD_SDSS P0_16 // LCD SD chip select
#define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card

#if ENABLED(AZSMZ_12864)
#define BEEPER_PIN P1_30
Expand All @@ -109,6 +108,7 @@
#define SD_SCK_PIN P0_07
#define SD_MISO_PIN P0_08
#define SD_MOSI_PIN P0_09
#define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card
#define SD_SS_PIN ONBOARD_SD_CS_PIN
#elif SD_CONNECTION_IS(CUSTOM_CABLE)
#error "No custom SD drive cable defined for this board."
Expand Down
3 changes: 1 addition & 2 deletions Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@


/**
* ______ ______
* ------ ------
* NC | 1 2 | GND 5V | 1 2 | GND
* RESET | 3 4 | 1.31 NC | 3 4 | NC
* 0.18 | 5 6 3.25 NC | 5 6 0.15
Expand Down Expand Up @@ -82,7 +82,6 @@
#define EXP2_09_PIN P0_15
#define EXP2_10_PIN P0_17


/**
* LCD / Controller
*
Expand Down
8 changes: 4 additions & 4 deletions Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
#endif

/**
* ______ ______
* ------ ------
* NC | 1 2 | GND 5V | 1 2 | GND
* RESET | 3 4 | 1.31 (SD_DETECT) (LCD_D7) 1.23 | 3 4 | 1.22 (LCD_D6)
* (MOSI) 0.18 | 5 6 3.25 (BTN_EN2) (LCD_D5) 1.21 | 5 6 1.20 (LCD_D4)
Expand Down Expand Up @@ -230,7 +230,7 @@
* The ANET_FULL_GRAPHICS_LCD connector plug:
*
* BEFORE AFTER
* ______ ______
* ------ ------
* GND 1 | 1 2 | 2 5V 5V 1 | 1 2 | 2 GND
* CS 3 | 3 4 | 4 BTN_EN2 CS 3 | 3 4 | 4 BTN_EN2
* SID 5 | 5 6 6 BTN_EN1 SID 5 | 5 6 6 BTN_EN1
Expand Down Expand Up @@ -386,11 +386,11 @@

/**
* Creality Ender-2 display pinout
* _____
* -----
* 5V | 1 2 | GND
* (MOSI) P1_23 | 3 4 | P1_22 (LCD_CS)
* (LCD_A0) P1_21 | 5 6 P1_20 (BTN_EN2)
* RESET P1_19 | 7 8 | P1_18 (BTN_EN1)
* (RESET) P1_19 | 7 8 | P1_18 (BTN_EN1)
* (BTN_ENC) P0_28 | 9 10| P1_30 (SCK)
* -----
* EXP1
Expand Down
72 changes: 30 additions & 42 deletions Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h
Original file line number Diff line number Diff line change
Expand Up @@ -239,14 +239,14 @@
#define TMC_BAUD_RATE 19200
#endif

/* _____ _____
* NC | 1 2 | GND 5V | 1 2 | GND
* RESET | 3 4 | 1.31 1.23 | 3 4 | 1.22
* 0.18 | 5 6 3.25 1.21 | 5 6 1.20
* 0.16 | 7 8 | 3.26 1.19 | 7 8 | 1.18
* 0.15 | 9 10| 0.17 0.28 | 9 10| 1.30
* ----- -----
* EXP2 EXP1
/** ------ ------
* NC | 1 2 | GND 5V | 1 2 | GND
* RESET | 3 4 | 1.31 1.23 | 3 4 | 1.22
* 0.18 | 5 6 3.25 1.21 | 5 6 1.20
* 0.16 | 7 8 | 3.26 1.19 | 7 8 | 1.18
* 0.15 | 9 10| 0.17 0.28 | 9 10| 1.30
* ------ ------
* EXP2 EXP1
*/

#define EXP1_03_PIN P1_23
Expand All @@ -267,27 +267,15 @@
#define EXP2_09_PIN P0_15
#define EXP2_10_PIN P0_17

/**
* _____ _____
* NC | · · | GND 5V | · · | GND
* RESET | · · | 1.31 (SD_DETECT) (LCD_D7) 1.23 | · · | 1.22 (LCD_D6)
* (MOSI) 0.18 | · · 3.25 (BTN_EN2) (LCD_D5) 1.21 | · · 1.20 (LCD_D4)
* (SD_SS) 0.16 | · · | 3.26 (BTN_EN1) (LCD_RS) 1.19 | · · | 1.18 (LCD_EN)
* (SCK) 0.15 | · · | 0.17 (MISO) (BTN_ENC) 0.28 | · · | 1.30 (BEEPER)
* ----- -----
* EXP2 EXP1
*/

#if ENABLED(DWIN_CREALITY_LCD)
#if EITHER(DWIN_CREALITY_LCD, IS_DWIN_MARLINUI)

// RET6 DWIN ENCODER LCD
#define BTN_ENC P1_20
#define BTN_EN1 P1_23
#define BTN_EN2 P1_22
#define BTN_ENC EXP1_06_PIN
#define BTN_EN1 EXP1_03_PIN
#define BTN_EN2 EXP1_04_PIN

#ifndef BEEPER_PIN
#define BEEPER_PIN P1_21
#undef SPEAKER
#define BEEPER_PIN EXP1_05_PIN
#endif

#elif HAS_WIRED_LCD && !BTT_MOTOR_EXPANSION
Expand All @@ -304,13 +292,13 @@
* The ANET_FULL_GRAPHICS_LCD_ALT_WIRING connector plug:
*
* BEFORE AFTER
* _____ _____
* GND | 1 2 | 5V 5V | 1 2 | GND
* CS | 3 4 | BTN_EN2 CS | 3 4 | BTN_EN2
* SID | 5 6 BTN_EN1 SID | 5 6 BTN_EN1
* open | 7 8 | BTN_ENC open | 7 8 | BTN_ENC
* CLK | 9 10| Beeper CLK | 9 10| Beeper
* ----- -----
* ------ ------
* GND | 1 2 | 5V 5V | 1 2 | GND
* CS | 3 4 | BTN_EN2 CS | 3 4 | BTN_EN2
* SID | 5 6 BTN_EN1 SID | 5 6 BTN_EN1
* open | 7 8 | BTN_ENC open | 7 8 | BTN_ENC
* CLK | 9 10| BEEPER CLK | 9 10| BEEPER
* ------ ------
* LCD LCD
*/

Expand All @@ -337,15 +325,15 @@
*
* The ANET_FULL_GRAPHICS_LCD connector plug:
*
* BEFORE AFTER
* ______ ______
* GND | 1 2 | 5V 5V | 1 2 | GND
* CS | 3 4 | BTN_EN2 CS | 3 4 | BTN_EN2
* SID | 5 6 BTN_EN1 SID | 5 6 BTN_EN1
* open | 7 8 | BTN_ENC CLK | 7 8 | BTN_ENC
* CLK | 9 10 | Beeper open | 9 10 | Beeper
* ------ ------
* LCD LCD
* BEFORE AFTER
* ------ ------
* GND | 1 2 | 5V 5V | 1 2 | GND
* CS | 3 4 | BTN_EN2 CS | 3 4 | BTN_EN2
* SID | 5 6 BTN_EN1 SID | 5 6 BTN_EN1
* open | 7 8 | BTN_ENC CLK | 7 8 | BTN_ENC
* CLK | 9 10 | BEEPER open | 9 10 | BEEPER
* ------ ------
* LCD LCD
*/

#define LCD_PINS_RS EXP1_03_PIN
Expand All @@ -372,7 +360,7 @@
#elif ENABLED(ENDER2_STOCKDISPLAY)

/** Creality Ender-2 display pinout
* ______
* ------
* 5V | 1 2 | GND
* (MOSI) 1.23 | 3 4 | 1.22 (LCD_RS)
* (LCD_A0) 1.21 | 5 6 1.20 (BTN_EN2)
Expand Down
5 changes: 2 additions & 3 deletions Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,6 @@
#endif
#endif

#define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card

#if SD_CONNECTION_IS(LCD) && ENABLED(SKR_USE_LCD_SD_CARD_PINS_FOR_CS)
#error "SDCARD_CONNECTION must not be 'LCD' with SKR_USE_LCD_SD_CARD_PINS_FOR_CS."
#endif
Expand All @@ -145,13 +143,14 @@
#define SD_SCK_PIN P0_07
#define SD_MISO_PIN P0_08
#define SD_MOSI_PIN P0_09
#define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card
#define SD_SS_PIN ONBOARD_SD_CS_PIN
#elif SD_CONNECTION_IS(CUSTOM_CABLE)
#error "No custom SD drive cable defined for this board."
#endif

#if ENABLED(BTT_MOTOR_EXPANSION)
/** ______ ______
/** ------ ------
* NC | 1 2 | GND NC | 1 2 | GND
* NC | 3 4 | M1EN M2EN | 3 4 | M3EN
* M1STP | 5 6 M1DIR M1RX | 5 6 M1DIAG
Expand Down
3 changes: 1 addition & 2 deletions Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,6 @@
#define SDCARD_CONNECTION LCD
#endif

#define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card

#if SD_CONNECTION_IS(LCD)
#define SD_SCK_PIN P0_15
#define SD_MISO_PIN P0_17
Expand All @@ -167,5 +165,6 @@
#define SD_SCK_PIN P0_07
#define SD_MISO_PIN P0_08
#define SD_MOSI_PIN P0_09
#define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card
#define SD_SS_PIN ONBOARD_SD_CS_PIN
#endif
3 changes: 1 addition & 2 deletions Marlin/src/pins/lpc1768/pins_MKS_SBASE.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,6 @@
#define SDCARD_CONNECTION ONBOARD
#endif

#define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card

#if SD_CONNECTION_IS(CUSTOM_CABLE)

/**
Expand Down Expand Up @@ -199,6 +197,7 @@
#define SD_SS_PIN P0_28
#else
#define SD_DETECT_PIN P0_27
#define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card
#define SD_SS_PIN ONBOARD_SD_CS_PIN
#endif
#endif
Expand Down
Loading