Skip to content

Commit 9b870c5

Browse files
committed
Changed SD examples to make REASSIGN_PINS more transparent. Fixes espressif#9082
1 parent b499972 commit 9b870c5

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

libraries/SD/examples/SD_Test/SD_Test.ino

+3-2
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,10 @@ void setup(){
214214

215215
#ifdef REASSIGN_PINS
216216
SPI.begin(sck, miso, mosi, cs);
217-
#endif
218-
//if(!SD.begin(cs)){ //Change to this function to manually change CS pin
217+
if(!SD.begin(cs)){
218+
#else
219219
if(!SD.begin()){
220+
#endif
220221
Serial.println("Card Mount Failed");
221222
return;
222223
}

libraries/SD/examples/SD_time/SD_time.ino

+3-2
Original file line numberDiff line numberDiff line change
@@ -208,9 +208,10 @@ void setup(){
208208

209209
#ifdef REASSIGN_PINS
210210
SPI.begin(sck, miso, mosi, cs);
211-
#endif
212-
//if(!SD.begin(cs)){ //Change to this function to manually change CS pin
211+
if(!SD.begin(cs)){
212+
#else
213213
if(!SD.begin()){
214+
#endif
214215
Serial.println("Card Mount Failed");
215216
return;
216217
}

0 commit comments

Comments
 (0)