Skip to content

Commit

Permalink
SDIO doesn't take a clock speed parameter (#2766)
Browse files Browse the repository at this point in the history
It's fixed by the PIO program and GPIO slew rates encoded in the SdFAT
driver.  Remove the parameter from the SD/SDFS begins.
  • Loading branch information
earlephilhower authored Jan 18, 2025
1 parent 452ef17 commit e20c973
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions libraries/SD/src/SD.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ class SDClass {
return SDFS.begin();
}

bool begin(uint8_t clkPin, uint8_t cmdPin, uint8_t dat0Pin, uint32_t cfg = SD_SCK_MHZ(50)) {
SDFS.setConfig(SDFSConfig(clkPin, cmdPin, dat0Pin, cfg));
bool begin(uint8_t clkPin, uint8_t cmdPin, uint8_t dat0Pin) {
SDFS.setConfig(SDFSConfig(clkPin, cmdPin, dat0Pin));
return SDFS.begin();
}

Expand Down
2 changes: 1 addition & 1 deletion libraries/SDFS/src/SDFS.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class SDFSConfig : public FSConfig {
static constexpr uint32_t FSId = 0x53444653;

SDFSConfig(uint8_t csPin = 4, uint32_t spi = SD_SCK_MHZ(10), HardwareSPI &port = SPI) : FSConfig(FSId, false), _sdio(false), _clkPin(255), _csPin(csPin), _cmdPin(255), _dat0Pin(255), _part(0), _spiSettings(spi), _spi(&port) { }
SDFSConfig(uint8_t clkPin, uint8_t cmdPin, uint8_t dataPin, uint32_t spi = SD_SCK_MHZ(10)) : FSConfig(FSId, false), _sdio(true), _clkPin(clkPin), _cmdPin(cmdPin), _dat0Pin(dataPin), _part(0), _spiSettings(spi), _spi(nullptr) { }
SDFSConfig(uint8_t clkPin, uint8_t cmdPin, uint8_t dataPin) : FSConfig(FSId, false), _sdio(true), _clkPin(clkPin), _cmdPin(cmdPin), _dat0Pin(dataPin), _part(0), _spiSettings(SD_SCK_MHZ(1)), _spi(nullptr) { }

SDFSConfig setAutoFormat(bool val = true) {
_autoFormat = val;
Expand Down

0 comments on commit e20c973

Please sign in to comment.