⚰️ Remove obsolete CUSTOM_SPI_PINS (#22058)
This commit is contained in:
parent
16bca67f2d
commit
e6ef43e51a
@ -163,11 +163,9 @@ static SPISettings spiConfig;
|
|||||||
}
|
}
|
||||||
spiConfig = SPISettings(clock, MSBFIRST, SPI_MODE0);
|
spiConfig = SPISettings(clock, MSBFIRST, SPI_MODE0);
|
||||||
|
|
||||||
#if ENABLED(CUSTOM_SPI_PINS)
|
|
||||||
SPI.setMISO(SD_MISO_PIN);
|
SPI.setMISO(SD_MISO_PIN);
|
||||||
SPI.setMOSI(SD_MOSI_PIN);
|
SPI.setMOSI(SD_MOSI_PIN);
|
||||||
SPI.setSCLK(SD_SCK_PIN);
|
SPI.setSCLK(SD_SCK_PIN);
|
||||||
#endif
|
|
||||||
|
|
||||||
SPI.begin();
|
SPI.begin();
|
||||||
}
|
}
|
||||||
|
@ -276,6 +276,9 @@
|
|||||||
|
|
||||||
#if SD_CONNECTION_IS(ONBOARD)
|
#if SD_CONNECTION_IS(ONBOARD)
|
||||||
#define SD_DETECT_PIN PC4
|
#define SD_DETECT_PIN PC4
|
||||||
|
#define SD_SCK_PIN PA5
|
||||||
|
#define SD_MISO_PIN PA6
|
||||||
|
#define SD_MOSI_PIN PA7
|
||||||
#elif SD_CONNECTION_IS(LCD) && BOTH(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050)
|
#elif SD_CONNECTION_IS(LCD) && BOTH(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050)
|
||||||
#define SD_DETECT_PIN PA15
|
#define SD_DETECT_PIN PA15
|
||||||
#define SD_SS_PIN PA10
|
#define SD_SS_PIN PA10
|
||||||
|
@ -280,11 +280,8 @@
|
|||||||
#define ONBOARD_SPI_DEVICE 1 // SPI1 -> used only by HAL/STM32F1...
|
#define ONBOARD_SPI_DEVICE 1 // SPI1 -> used only by HAL/STM32F1...
|
||||||
#define ONBOARD_SD_CS_PIN PA4 // Chip select for "System" SD card
|
#define ONBOARD_SD_CS_PIN PA4 // Chip select for "System" SD card
|
||||||
|
|
||||||
#define CUSTOM_SPI_PINS // TODO: needed because is the only way to set SPI for SD on STM32 (for now)
|
|
||||||
#if ENABLED(CUSTOM_SPI_PINS)
|
|
||||||
#define ENABLE_SPI1
|
#define ENABLE_SPI1
|
||||||
#define SDSS ONBOARD_SD_CS_PIN
|
#define SDSS ONBOARD_SD_CS_PIN
|
||||||
#define SD_SCK_PIN PA5
|
#define SD_SCK_PIN PA5
|
||||||
#define SD_MISO_PIN PA6
|
#define SD_MISO_PIN PA6
|
||||||
#define SD_MOSI_PIN PA7
|
#define SD_MOSI_PIN PA7
|
||||||
#endif
|
|
||||||
|
@ -186,7 +186,6 @@
|
|||||||
|
|
||||||
// TODO: This is the only way to set SPI for SD on STM32 (for now)
|
// TODO: This is the only way to set SPI for SD on STM32 (for now)
|
||||||
#define ENABLE_SPI2
|
#define ENABLE_SPI2
|
||||||
#define CUSTOM_SPI_PINS
|
|
||||||
#define SD_SCK_PIN PB13
|
#define SD_SCK_PIN PB13
|
||||||
#define SD_MISO_PIN PB14
|
#define SD_MISO_PIN PB14
|
||||||
#define SD_MOSI_PIN PB15
|
#define SD_MOSI_PIN PB15
|
||||||
|
@ -205,13 +205,10 @@
|
|||||||
#define EXP2_10_PIN PA6
|
#define EXP2_10_PIN PA6
|
||||||
|
|
||||||
// HAL SPI1 pins
|
// HAL SPI1 pins
|
||||||
#define CUSTOM_SPI_PINS
|
|
||||||
#if ENABLED(CUSTOM_SPI_PINS)
|
|
||||||
#define SD_SCK_PIN EXP2_09_PIN // SPI1 SCLK
|
#define SD_SCK_PIN EXP2_09_PIN // SPI1 SCLK
|
||||||
#define SD_SS_PIN EXP2_07_PIN // SPI1 SSEL
|
#define SD_SS_PIN EXP2_07_PIN // SPI1 SSEL
|
||||||
#define SD_MISO_PIN EXP2_10_PIN // SPI1 MISO
|
#define SD_MISO_PIN EXP2_10_PIN // SPI1 MISO
|
||||||
#define SD_MOSI_PIN EXP2_05_PIN // SPI1 MOSI
|
#define SD_MOSI_PIN EXP2_05_PIN // SPI1 MOSI
|
||||||
#endif
|
|
||||||
|
|
||||||
#define SDSS EXP2_07_PIN
|
#define SDSS EXP2_07_PIN
|
||||||
|
|
||||||
|
@ -357,8 +357,6 @@
|
|||||||
|
|
||||||
#elif SD_CONNECTION_IS(ONBOARD)
|
#elif SD_CONNECTION_IS(ONBOARD)
|
||||||
|
|
||||||
// Instruct the STM32 HAL to override the default SPI pins from the variant.h file
|
|
||||||
#define CUSTOM_SPI_PINS
|
|
||||||
#define SDSS PA4
|
#define SDSS PA4
|
||||||
#define SD_SS_PIN SDSS
|
#define SD_SS_PIN SDSS
|
||||||
#define SD_SCK_PIN PA5
|
#define SD_SCK_PIN PA5
|
||||||
|
@ -356,7 +356,6 @@
|
|||||||
#define SD_DETECT_PIN PC14
|
#define SD_DETECT_PIN PC14
|
||||||
#elif SD_CONNECTION_IS(LCD)
|
#elif SD_CONNECTION_IS(LCD)
|
||||||
|
|
||||||
#define CUSTOM_SPI_PINS
|
|
||||||
#define SDSS PA4
|
#define SDSS PA4
|
||||||
#define SD_SS_PIN SDSS
|
#define SD_SS_PIN SDSS
|
||||||
#define SD_SCK_PIN PA5
|
#define SD_SCK_PIN PA5
|
||||||
|
@ -348,7 +348,6 @@
|
|||||||
|
|
||||||
#elif SD_CONNECTION_IS(LCD)
|
#elif SD_CONNECTION_IS(LCD)
|
||||||
|
|
||||||
#define CUSTOM_SPI_PINS
|
|
||||||
#define SDSS PA4
|
#define SDSS PA4
|
||||||
#define SD_SS_PIN SDSS
|
#define SD_SS_PIN SDSS
|
||||||
#define SD_SCK_PIN PA5
|
#define SD_SCK_PIN PA5
|
||||||
|
@ -217,8 +217,6 @@
|
|||||||
//
|
//
|
||||||
// detect pin dont work when ONBOARD and NO_SD_HOST_DRIVE disabled
|
// detect pin dont work when ONBOARD and NO_SD_HOST_DRIVE disabled
|
||||||
#if SD_CONNECTION_IS(ONBOARD)
|
#if SD_CONNECTION_IS(ONBOARD)
|
||||||
#define CUSTOM_SPI_PINS // TODO: needed because is the only way to set SPI3 for SD on STM32 (by now)
|
|
||||||
#if ENABLED(CUSTOM_SPI_PINS)
|
|
||||||
#define ENABLE_SPI3
|
#define ENABLE_SPI3
|
||||||
#define SD_SS_PIN -1
|
#define SD_SS_PIN -1
|
||||||
#define SDSS PC9
|
#define SDSS PC9
|
||||||
@ -227,14 +225,11 @@
|
|||||||
#define SD_MOSI_PIN PC12
|
#define SD_MOSI_PIN PC12
|
||||||
#define SD_DETECT_PIN PD12
|
#define SD_DETECT_PIN PD12
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// LCD SD
|
// LCD SD
|
||||||
//
|
//
|
||||||
#if SD_CONNECTION_IS(LCD)
|
#if SD_CONNECTION_IS(LCD)
|
||||||
#define CUSTOM_SPI_PINS
|
|
||||||
#if ENABLED(CUSTOM_SPI_PINS)
|
|
||||||
#define ENABLE_SPI1
|
#define ENABLE_SPI1
|
||||||
#define SDSS PE10
|
#define SDSS PE10
|
||||||
#define SD_SCK_PIN PA5
|
#define SD_SCK_PIN PA5
|
||||||
@ -242,7 +237,6 @@
|
|||||||
#define SD_MOSI_PIN PA7
|
#define SD_MOSI_PIN PA7
|
||||||
#define SD_DETECT_PIN PE12
|
#define SD_DETECT_PIN PE12
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// LCD / Controller
|
// LCD / Controller
|
||||||
|
@ -214,9 +214,6 @@
|
|||||||
//
|
//
|
||||||
// detect pin dont work when ONBOARD and NO_SD_HOST_DRIVE disabled
|
// detect pin dont work when ONBOARD and NO_SD_HOST_DRIVE disabled
|
||||||
#if !defined(SDCARD_CONNECTION) || SDCARD_CONNECTION == ONBOARD
|
#if !defined(SDCARD_CONNECTION) || SDCARD_CONNECTION == ONBOARD
|
||||||
#define CUSTOM_SPI_PINS
|
|
||||||
#if ENABLED(CUSTOM_SPI_PINS)
|
|
||||||
|
|
||||||
#if USE_NEW_SPI_API
|
#if USE_NEW_SPI_API
|
||||||
#define SD_SPI MARLIN_SPI(HardwareSPI3, PC9)
|
#define SD_SPI MARLIN_SPI(HardwareSPI3, PC9)
|
||||||
#else
|
#else
|
||||||
@ -229,15 +226,12 @@
|
|||||||
#endif
|
#endif
|
||||||
#define SD_DETECT_PIN PD12
|
#define SD_DETECT_PIN PD12
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
//
|
//
|
||||||
// LCD SD
|
// LCD SD
|
||||||
//
|
//
|
||||||
#if SDCARD_CONNECTION == LCD
|
#if SDCARD_CONNECTION == LCD
|
||||||
#define CUSTOM_SPI_PINS
|
|
||||||
#if ENABLED(CUSTOM_SPI_PINS)
|
|
||||||
#define ENABLE_SPI1
|
#define ENABLE_SPI1
|
||||||
#define SDSS PE10
|
#define SDSS PE10
|
||||||
#define SD_SCK_PIN PA5
|
#define SD_SCK_PIN PA5
|
||||||
@ -245,7 +239,6 @@
|
|||||||
#define SD_MOSI_PIN PA7
|
#define SD_MOSI_PIN PA7
|
||||||
#define SD_DETECT_PIN PE12
|
#define SD_DETECT_PIN PE12
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//
|
//
|
||||||
|
Loading…
Reference in New Issue
Block a user