We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 77209a1 commit ea88740Copy full SHA for ea88740
libraries/SD/src/SD.h
@@ -32,6 +32,7 @@
32
class SDClass {
33
public:
34
bool begin(uint8_t csPin, HardwareSPI &spi) {
35
+ _spi = &spi;
36
SDFS.setConfig(SDFSConfig(csPin, SPI_HALF_SPEED, spi));
37
return SDFS.begin();
38
}
@@ -43,7 +44,7 @@ class SDClass {
43
44
void end(bool endSPI = true) {
45
SDFS.end();
46
if (endSPI) {
- SPI.end();
47
+ _spi->end();
48
49
50
@@ -204,6 +205,7 @@ class SDClass {
204
205
return time(nullptr);
206
207
208
+ HardwareSPI *_spi;
209
};
210
211
0 commit comments