mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-12 01:53:07 +03:00
Add option to select SPI speed at SD::begin
This commit is contained in:
@ -332,7 +332,7 @@ boolean callback_rmdir(SdFile& parentDir, char *filePathComponent,
|
||||
|
||||
|
||||
|
||||
boolean SDClass::begin(uint8_t csPin) {
|
||||
boolean SDClass::begin(uint8_t csPin, uint32_t speed) {
|
||||
/*
|
||||
|
||||
Performs the initialisation required by the sdfatlib library.
|
||||
@ -340,7 +340,7 @@ boolean SDClass::begin(uint8_t csPin) {
|
||||
Return true if initialization succeeds, false otherwise.
|
||||
|
||||
*/
|
||||
return card.init(SPI_HALF_SPEED, csPin) &&
|
||||
return card.init(speed, csPin) &&
|
||||
volume.init(card) &&
|
||||
root.openRoot(volume);
|
||||
}
|
||||
|
Reference in New Issue
Block a user