Unverified Commit ea887403 authored by Earle F. Philhower, III's avatar Earle F. Philhower, III Committed by GitHub

Use passed-in SPI on SD.end(true) (#2040)

Fixes #2034
parent 77209a12
......@@ -32,6 +32,7 @@
class SDClass {
public:
bool begin(uint8_t csPin, HardwareSPI &spi) {
_spi = &spi;
SDFS.setConfig(SDFSConfig(csPin, SPI_HALF_SPEED, spi));
return SDFS.begin();
}
......@@ -43,7 +44,7 @@ public:
void end(bool endSPI = true) {
SDFS.end();
if (endSPI) {
SPI.end();
_spi->end();
}
}
......@@ -204,6 +205,7 @@ private:
return time(nullptr);
}
HardwareSPI *_spi;
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment