mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2025-01-19 16:16:13 +00:00
🧑💻 SDIO_SUPPORT => ONBOARD_SDIO
This commit is contained in:
parent
5664c02d07
commit
921591d2b8
35 changed files with 47 additions and 47 deletions
|
@ -41,8 +41,8 @@
|
|||
#error "EMERGENCY_PARSER is not yet implemented for SAMD21. Disable EMERGENCY_PARSER to continue."
|
||||
#endif
|
||||
|
||||
#if ENABLED(SDIO_SUPPORT)
|
||||
#error "SDIO_SUPPORT is not supported on SAMD21."
|
||||
#if ENABLED(ONBOARD_SDIO)
|
||||
#error "ONBOARD_SDIO is not supported on SAMD21."
|
||||
#endif
|
||||
|
||||
#if ENABLED(FAST_PWM_FAN)
|
||||
|
|
|
@ -54,8 +54,8 @@
|
|||
#error "EMERGENCY_PARSER is not yet implemented for SAMD51. Disable EMERGENCY_PARSER to continue."
|
||||
#endif
|
||||
|
||||
#if ENABLED(SDIO_SUPPORT)
|
||||
#error "SDIO_SUPPORT is not supported on SAMD51."
|
||||
#if ENABLED(ONBOARD_SDIO)
|
||||
#error "ONBOARD_SDIO is not supported on SAMD51."
|
||||
#endif
|
||||
|
||||
#if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY
|
||||
|
|
|
@ -70,7 +70,7 @@ void MarlinHAL::init() {
|
|||
constexpr int cpuFreq = F_CPU;
|
||||
UNUSED(cpuFreq);
|
||||
|
||||
#if HAS_MEDIA && DISABLED(SDIO_SUPPORT) && (defined(SDSS) && SDSS != -1)
|
||||
#if HAS_MEDIA && DISABLED(ONBOARD_SDIO) && (defined(SDSS) && SDSS != -1)
|
||||
OUT_WRITE(SDSS, HIGH); // Try to set SDSS inactive before any other SPI users start up
|
||||
#endif
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
|
||||
#if ENABLED(SDIO_SUPPORT)
|
||||
#if ENABLED(ONBOARD_SDIO)
|
||||
|
||||
#include "sdio.h"
|
||||
|
||||
|
@ -453,5 +453,5 @@ uint32_t SDIO_GetCardSize() {
|
|||
return (uint32_t)(hsd.SdCard.BlockNbr) * (hsd.SdCard.BlockSize);
|
||||
}
|
||||
|
||||
#endif // SDIO_SUPPORT
|
||||
#endif // ONBOARD_SDIO
|
||||
#endif // HAL_STM32
|
||||
|
|
|
@ -30,5 +30,5 @@
|
|||
|
||||
// Allow for no media drives
|
||||
#if !HAS_MEDIA
|
||||
#undef SDIO_SUPPORT
|
||||
#undef ONBOARD_SDIO
|
||||
#endif
|
||||
|
|
|
@ -545,7 +545,7 @@
|
|||
#endif
|
||||
|
||||
#if DISABLED(USB_FLASH_DRIVE_SUPPORT) || BOTH(MULTI_VOLUME, VOLUME_SD_ONBOARD)
|
||||
#if ENABLED(SDIO_SUPPORT)
|
||||
#if ENABLED(ONBOARD_SDIO)
|
||||
#define NEED_SD2CARD_SDIO 1
|
||||
#else
|
||||
#define NEED_SD2CARD_SPI 1
|
||||
|
|
|
@ -115,10 +115,10 @@
|
|||
//
|
||||
#define SD_DETECT_PIN PC7
|
||||
|
||||
#ifndef SDIO_SUPPORT
|
||||
#define SDIO_SUPPORT
|
||||
#ifndef ONBOARD_SDIO
|
||||
#define ONBOARD_SDIO
|
||||
#endif
|
||||
#if ENABLED(SDIO_SUPPORT)
|
||||
#if ENABLED(ONBOARD_SDIO)
|
||||
//
|
||||
// SPI
|
||||
//
|
||||
|
|
|
@ -169,7 +169,7 @@
|
|||
//
|
||||
// SD Card
|
||||
//
|
||||
#define SDIO_SUPPORT
|
||||
#define ONBOARD_SDIO
|
||||
#define SD_DETECT_PIN -1 // PF0, but it isn't connected
|
||||
#define SDIO_CLOCK 4500000
|
||||
#define SDIO_READ_RETRIES 16
|
||||
|
|
|
@ -127,7 +127,7 @@
|
|||
#define SDCARD_CONNECTION ONBOARD
|
||||
#define ON_BOARD_SPI_DEVICE 1
|
||||
#define ONBOARD_SD_CS_PIN PC12 // SDSS
|
||||
#define SDIO_SUPPORT
|
||||
#define ONBOARD_SDIO
|
||||
#define NO_SD_HOST_DRIVE // This board's SD is only seen by the printer
|
||||
|
||||
//
|
||||
|
|
|
@ -159,7 +159,7 @@
|
|||
//
|
||||
#define SD_DETECT_PIN PC7
|
||||
#define SDCARD_CONNECTION ONBOARD
|
||||
#define SDIO_SUPPORT
|
||||
#define ONBOARD_SDIO
|
||||
#define NO_SD_HOST_DRIVE // This board's SD is only seen by the printer
|
||||
|
||||
#if ANY(RET6_12864_LCD, HAS_DWIN_E3V2, IS_DWIN_MARLINUI)
|
||||
|
|
|
@ -140,7 +140,7 @@
|
|||
#define SDCARD_CONNECTION ONBOARD
|
||||
#define ONBOARD_SPI_DEVICE 1
|
||||
#define ONBOARD_SD_CS_PIN PA4 // SDSS
|
||||
#define SDIO_SUPPORT
|
||||
#define ONBOARD_SDIO
|
||||
#define NO_SD_HOST_DRIVE // This board's SD is only seen by the printer
|
||||
|
||||
#if ANY(RET6_12864_LCD, HAS_DWIN_E3V2, IS_DWIN_MARLINUI)
|
||||
|
|
|
@ -105,7 +105,7 @@
|
|||
#define SD_DETECT_PIN PC7
|
||||
#define NO_SD_HOST_DRIVE // SD is only seen by the printer
|
||||
|
||||
#define SDIO_SUPPORT // Extra added by Creality
|
||||
#define ONBOARD_SDIO // Extra added by Creality
|
||||
#define SDIO_CLOCK 6000000 // In original source code overridden by Creality in sdio.h
|
||||
|
||||
//
|
||||
|
|
|
@ -144,7 +144,7 @@
|
|||
#define SDCARD_CONNECTION ONBOARD
|
||||
#define ONBOARD_SPI_DEVICE 1
|
||||
#define ONBOARD_SD_CS_PIN PC11 // SDSS
|
||||
#define SDIO_SUPPORT
|
||||
#define ONBOARD_SDIO
|
||||
#define NO_SD_HOST_DRIVE // This board's SD is only seen by the printer
|
||||
|
||||
#if ANY(RET6_12864_LCD, HAS_DWIN_E3V2, IS_DWIN_MARLINUI)
|
||||
|
|
|
@ -256,7 +256,7 @@
|
|||
#define SD_SS_PIN -1
|
||||
#define SD_DETECT_PIN PD12 // SD_CD (if -1 no detection)
|
||||
#else
|
||||
#define SDIO_SUPPORT
|
||||
#define ONBOARD_SDIO
|
||||
#define SDIO_CLOCK 4500000 // 4.5 MHz
|
||||
#define SDIO_READ_RETRIES 16
|
||||
#define ONBOARD_SPI_DEVICE 1 // SPI1
|
||||
|
|
|
@ -158,7 +158,7 @@
|
|||
#define LCD_BRIGHTNESS_DEFAULT TFT_BACKLIGHT_PWM
|
||||
#endif
|
||||
|
||||
#if ENABLED(SDIO_SUPPORT)
|
||||
#if ENABLED(ONBOARD_SDIO)
|
||||
#define SD_SS_PIN -1 // else SDSS set to PA4 in M43 (spi_pins.h)
|
||||
#endif
|
||||
|
||||
|
|
|
@ -120,7 +120,7 @@
|
|||
#define SDCARD_CONNECTION ONBOARD
|
||||
#endif
|
||||
|
||||
#define SDIO_SUPPORT
|
||||
#define ONBOARD_SDIO
|
||||
#define SDIO_CLOCK 4500000 // 4.5 MHz
|
||||
#define SDIO_READ_RETRIES 16
|
||||
|
||||
|
|
|
@ -197,10 +197,10 @@
|
|||
// SPI1(PA7) & SPI3(PB5) not available
|
||||
#define SPI_DEVICE 2
|
||||
|
||||
#define SDIO_SUPPORT
|
||||
#define ONBOARD_SDIO
|
||||
#define SDIO_CLOCK 4500000
|
||||
#define SDIO_READ_RETRIES 16
|
||||
#if ENABLED(SDIO_SUPPORT)
|
||||
#if ENABLED(ONBOARD_SDIO)
|
||||
#define SD_SCK_PIN PB13 // SPI2
|
||||
#define SD_MISO_PIN PB14 // SPI2
|
||||
#define SD_MOSI_PIN PB15 // SPI2
|
||||
|
|
|
@ -239,7 +239,7 @@
|
|||
#endif
|
||||
|
||||
#if SD_CONNECTION_IS(ONBOARD)
|
||||
#define SDIO_SUPPORT
|
||||
#define ONBOARD_SDIO
|
||||
#define SDIO_CLOCK 4500000 // 4.5 MHz
|
||||
#define SD_DETECT_PIN PD12
|
||||
#define ONBOARD_SD_CS_PIN PC11
|
||||
|
|
|
@ -133,7 +133,7 @@
|
|||
#define SDCARD_CONNECTION ONBOARD
|
||||
#endif
|
||||
|
||||
#define SDIO_SUPPORT
|
||||
#define ONBOARD_SDIO
|
||||
#define SDIO_CLOCK 4500000 // 4.5 MHz
|
||||
#define SD_DETECT_PIN PD12
|
||||
#define ONBOARD_SPI_DEVICE 1 // SPI1
|
||||
|
|
|
@ -239,7 +239,7 @@
|
|||
#endif
|
||||
|
||||
#if SD_CONNECTION_IS(ONBOARD)
|
||||
#define SDIO_SUPPORT
|
||||
#define ONBOARD_SDIO
|
||||
#define SDIO_CLOCK 4500000 // 4.5 MHz
|
||||
#define SD_DETECT_PIN PD12
|
||||
#define ONBOARD_SD_CS_PIN PC11
|
||||
|
|
|
@ -163,7 +163,7 @@
|
|||
#define SDCARD_CONNECTION ONBOARD
|
||||
#endif
|
||||
|
||||
#define SDIO_SUPPORT
|
||||
#define ONBOARD_SDIO
|
||||
#define SDIO_CLOCK 4500000 // 4.5 MHz
|
||||
#define SD_DETECT_PIN PD12
|
||||
#define ONBOARD_SD_CS_PIN PC11
|
||||
|
|
|
@ -210,7 +210,7 @@
|
|||
#define SD_MOSI_PIN PB15
|
||||
#define SD_SS_PIN PG6
|
||||
#elif SD_CONNECTION_IS(ONBOARD)
|
||||
#define SDIO_SUPPORT
|
||||
#define ONBOARD_SDIO
|
||||
#define SD_DETECT_PIN PD12
|
||||
#define ONBOARD_SD_CS_PIN PC11
|
||||
#elif SD_CONNECTION_IS(CUSTOM_CABLE)
|
||||
|
|
|
@ -187,7 +187,7 @@
|
|||
#define SDCARD_CONNECTION ONBOARD
|
||||
#define ONBOARD_SPI_DEVICE 1
|
||||
#define ONBOARD_SD_CS_PIN PA4 // SDSS
|
||||
#define SDIO_SUPPORT
|
||||
#define ONBOARD_SDIO
|
||||
#define NO_SD_HOST_DRIVE // This board's SD is only seen by the printer
|
||||
|
||||
#if ANY(RET6_12864_LCD, HAS_DWIN_E3V2, IS_DWIN_MARLINUI)
|
||||
|
|
|
@ -186,7 +186,7 @@
|
|||
// SPI1(PA7) & SPI3(PB5) not available
|
||||
#define SPI_DEVICE 2
|
||||
|
||||
#if ENABLED(SDIO_SUPPORT)
|
||||
#if ENABLED(ONBOARD_SDIO)
|
||||
#define SD_SCK_PIN PB13 // SPI2 ok
|
||||
#define SD_MISO_PIN PB14 // SPI2 ok
|
||||
#define SD_MOSI_PIN PB15 // SPI2 ok
|
||||
|
|
|
@ -195,7 +195,7 @@
|
|||
//
|
||||
// SD Card
|
||||
//
|
||||
//#define SDIO_SUPPORT
|
||||
//#define ONBOARD_SDIO
|
||||
|
||||
#ifndef SDCARD_CONNECTION
|
||||
#define SDCARD_CONNECTION CUSTOM_CABLE
|
||||
|
@ -203,7 +203,7 @@
|
|||
|
||||
#if HAS_MEDIA
|
||||
|
||||
#if DISABLED(SDIO_SUPPORT)
|
||||
#if DISABLED(ONBOARD_SDIO)
|
||||
#define SOFTWARE_SPI
|
||||
#define SDSS PC11
|
||||
#define SD_SS_PIN SDSS
|
||||
|
|
|
@ -145,8 +145,8 @@
|
|||
#endif
|
||||
|
||||
#if SD_CONNECTION_IS(ONBOARD)
|
||||
#define SDIO_SUPPORT // Use SDIO for onboard SD
|
||||
#if DISABLED(SDIO_SUPPORT)
|
||||
#define ONBOARD_SDIO // Use SDIO for onboard SD
|
||||
#if DISABLED(ONBOARD_SDIO)
|
||||
#define SOFTWARE_SPI // Use soft SPI for onboard SD
|
||||
#define SDSS PC11
|
||||
#define SD_SCK_PIN PC12
|
||||
|
|
|
@ -383,7 +383,7 @@
|
|||
#endif
|
||||
|
||||
#if SD_CONNECTION_IS(ONBOARD)
|
||||
#define SDIO_SUPPORT // Use SDIO for onboard SD
|
||||
#define ONBOARD_SDIO // Use SDIO for onboard SD
|
||||
//#define SDIO_CLOCK 48000000
|
||||
#define SD_DETECT_PIN PC4
|
||||
#elif SD_CONNECTION_IS(CUSTOM_CABLE)
|
||||
|
|
|
@ -351,7 +351,7 @@
|
|||
// Must use soft SPI because Marlin's default hardware SPI is tied to LCD's EXP2
|
||||
//
|
||||
#if SD_CONNECTION_IS(ONBOARD)
|
||||
#define SDIO_SUPPORT // Use SDIO for onboard SD
|
||||
#define ONBOARD_SDIO // Use SDIO for onboard SD
|
||||
#ifndef SD_DETECT_STATE
|
||||
#define SD_DETECT_STATE HIGH
|
||||
#elif SD_DETECT_STATE == LOW
|
||||
|
|
|
@ -372,7 +372,7 @@
|
|||
#define SD_MOSI_PIN EXP2_06_PIN
|
||||
#define SD_DETECT_PIN EXP2_07_PIN
|
||||
#elif SD_CONNECTION_IS(ONBOARD)
|
||||
#define SDIO_SUPPORT // Use SDIO for onboard SD
|
||||
#define ONBOARD_SDIO // Use SDIO for onboard SD
|
||||
#elif SD_CONNECTION_IS(CUSTOM_CABLE)
|
||||
#error "No custom SD drive cable defined for this board."
|
||||
#endif
|
||||
|
|
|
@ -214,9 +214,9 @@
|
|||
|
||||
#if SD_CONNECTION_IS(ONBOARD)
|
||||
|
||||
#define SDIO_SUPPORT // Use SDIO for onboard SD
|
||||
#define ONBOARD_SDIO // Use SDIO for onboard SD
|
||||
|
||||
#if DISABLED(SDIO_SUPPORT)
|
||||
#if DISABLED(ONBOARD_SDIO)
|
||||
#define SOFTWARE_SPI // Use soft SPI for onboard SD
|
||||
#define SDSS PC11
|
||||
#define SD_SCK_PIN PC12
|
||||
|
|
|
@ -217,10 +217,10 @@
|
|||
//
|
||||
// SD support
|
||||
//
|
||||
#define SDIO_SUPPORT
|
||||
#define ONBOARD_SDIO
|
||||
#define SDIO_CLOCK 4800000
|
||||
#define SD_DETECT_PIN PA8
|
||||
#if DISABLED(SDIO_SUPPORT)
|
||||
#if DISABLED(ONBOARD_SDIO)
|
||||
#define SOFTWARE_SPI
|
||||
#define SD_SCK_PIN PC12
|
||||
#define SD_MISO_PIN PC8
|
||||
|
|
|
@ -160,10 +160,10 @@
|
|||
//
|
||||
// SD support
|
||||
//
|
||||
#define SDIO_SUPPORT
|
||||
#define ONBOARD_SDIO
|
||||
#define SDIO_CLOCK 4800000
|
||||
#define SD_DETECT_PIN PG15
|
||||
#if DISABLED(SDIO_SUPPORT)
|
||||
#if DISABLED(ONBOARD_SDIO)
|
||||
#define SOFTWARE_SPI
|
||||
#define SD_SCK_PIN PC12
|
||||
#define SD_MISO_PIN PC8
|
||||
|
|
|
@ -118,10 +118,10 @@
|
|||
//
|
||||
// SD support (On board)
|
||||
//
|
||||
#define SDIO_SUPPORT
|
||||
#define ONBOARD_SDIO
|
||||
#define SD_DETECT_PIN PA8
|
||||
#define SDIO_CLOCK 4800000
|
||||
#if DISABLED(SDIO_SUPPORT)
|
||||
#if DISABLED(ONBOARD_SDIO)
|
||||
#define SOFTWARE_SPI
|
||||
#define SD_SCK_PIN PC12
|
||||
#define SD_MISO_PIN PC8
|
||||
|
|
|
@ -251,7 +251,7 @@
|
|||
//
|
||||
// SD Card
|
||||
//
|
||||
#define SDIO_SUPPORT
|
||||
#define ONBOARD_SDIO
|
||||
#define SD_DETECT_PIN -1 // PF0, but not connected
|
||||
#define SDIO_CLOCK 4500000
|
||||
#define SDIO_READ_RETRIES 16
|
||||
|
|
|
@ -360,7 +360,7 @@
|
|||
#define SD_MOSI_PIN EXP2_06_PIN
|
||||
#define SD_DETECT_PIN EXP2_07_PIN
|
||||
#elif SD_CONNECTION_IS(ONBOARD)
|
||||
#define SDIO_SUPPORT
|
||||
#define ONBOARD_SDIO
|
||||
#define SDIO_CLOCK 24000000 // 24MHz
|
||||
#elif SD_CONNECTION_IS(CUSTOM_CABLE)
|
||||
#error "No custom SD drive cable defined for this board."
|
||||
|
|
Loading…
Reference in a new issue