mirror of
https://github.com/justcallmekoko/ESP32Marauder.git
synced 2025-12-22 23:26:45 -08:00
fix m5stickcplus sdinterface
This commit is contained in:
@@ -32,9 +32,9 @@ bool SDInterface::initSD() {
|
|||||||
- CS (jumper to SD Card GND Pin)
|
- CS (jumper to SD Card GND Pin)
|
||||||
*/
|
*/
|
||||||
enum { SPI_SCK = 0, SPI_MISO = 36, SPI_MOSI = 26 };
|
enum { SPI_SCK = 0, SPI_MISO = 36, SPI_MOSI = 26 };
|
||||||
SPIClass SPI_EXT;
|
this->spiExt = new SPIClass();
|
||||||
SPI_EXT.begin(SPI_SCK, SPI_MISO, SPI_MOSI, SD_CS);
|
this->spiExt->begin(SPI_SCK, SPI_MISO, SPI_MOSI, SD_CS);
|
||||||
if (!SD.begin(SD_CS, SPI_EXT)) {
|
if (!SD.begin(SD_CS, *(this->spiExt))) {
|
||||||
#else
|
#else
|
||||||
if (!SD.begin(SD_CS)) {
|
if (!SD.begin(SD_CS)) {
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -26,6 +26,9 @@ extern Settings settings_obj;
|
|||||||
class SDInterface {
|
class SDInterface {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
#if defined(MARAUDER_M5STICKC)
|
||||||
|
SPIClass *spiExt;
|
||||||
|
#endif
|
||||||
bool checkDetectPin();
|
bool checkDetectPin();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
Reference in New Issue
Block a user