Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
dariosalvi78 authored and cmaglie committed Nov 9, 2017
1 parent a638e87 commit cac36d3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/SD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,8 @@ boolean callback_rmdir(SdFile& parentDir, const char *filePathComponent,


boolean SDClass::begin(uint8_t csPin) {
if(root.isOpen()) root.close();

/*
Performs the initialisation required by the sdfatlib library.
Expand All @@ -348,6 +350,8 @@ boolean SDClass::begin(uint8_t csPin) {
}

boolean SDClass::begin(uint32_t clock, uint8_t csPin) {
if(root.isOpen()) root.close();

return card.init(SPI_HALF_SPEED, csPin) &&
card.setSpiClock(clock) &&
volume.init(card) &&
Expand Down

0 comments on commit cac36d3

Please sign in to comment.