Closed
Description
In some of my Projects I need to change the SD card. There is a simple allow this. I just require a single line in the SD.c library.
boolean SDClass::begin(uint8_t csPin) {
/*
Performs the initialisation required by the sdfatlib library.
Return true if initialization succeeds, false otherwise.
*/
// ----> Line Added
if (root.isOpen()) root.close(); // allows repeated calls
// <--- Line Added
return card.init(SPI_HALF_SPEED, csPin) &&
volume.init(card) &&
root.openRoot(volume);
}
After changing the SD card all you need is to reinitialize the sd card.
Same Issue is posted in arduino as no 3607
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.