From 34a847a012fcc7419cd7dbbf9085513d187eadb2 Mon Sep 17 00:00:00 2001 From: Th3maz1ng Date: Sat, 5 Oct 2019 17:17:23 +0200 Subject: [PATCH] Updated constructor, switched cs pin and spi speed parameters for begin --- src/libs/SD/src/SD.cpp | 2 +- src/libs/SD/src/SD.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/SD/src/SD.cpp b/src/libs/SD/src/SD.cpp index fa7aa57..f0f1886 100644 --- a/src/libs/SD/src/SD.cpp +++ b/src/libs/SD/src/SD.cpp @@ -337,7 +337,7 @@ boolean callback_rmdir(SdFile& parentDir, char *filePathComponent, -boolean SDClass::begin(uint32_t speed, uint8_t csPin) { +boolean SDClass::begin(uint8_t csPin, uint32_t speed) { /* Performs the initialisation required by the sdfatlib library. diff --git a/src/libs/SD/src/SD.h b/src/libs/SD/src/SD.h index 51ed484..ed20cfd 100644 --- a/src/libs/SD/src/SD.h +++ b/src/libs/SD/src/SD.h @@ -90,7 +90,7 @@ private: public: // This needs to be called to set up the connection to the SD card // before other methods are used. - boolean begin( uint32_t speed = SPI_HALF_SPEED, uint8_t csPin = SD_CHIP_SELECT_PIN); + boolean begin(uint8_t csPin = SD_CHIP_SELECT_PIN, uint32_t speed = SPI_HALF_SPEED); /* In the following sequence: