Skip to content

Commit

Permalink
sdcard.cpp edits
Browse files Browse the repository at this point in the history
  • Loading branch information
Klaus K Wilting committed Jun 6, 2020
1 parent 48cbe53 commit 6c24aea
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/sdcard.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#ifdef HAS_SDCARD
#if HAS_SDCARD == 1
#include <mySD.h>
//#include <SD.h>
#elif HAS_SDCARD == 2
#include <SD_MMC.h>
#else
Expand Down
6 changes: 6 additions & 0 deletions src/sdcard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@ bool sdcard_init() {
// https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/sdmmc_host.html

#if HAS_SDCARD == 1 // use SD SPI host driver

useSDCard = SD.begin(SDCARD_CS, SDCARD_MOSI, SDCARD_MISO, SDCARD_SCLK);

//SPI.begin(SDCARD_SCLK, SDCARD_MSO, SDCARD_MOSI, SDCARD_CS);
//delay(10);
//useSDCard = SD.begin(SDCARD_CS, SPI, 40000000, "/sd");

#elif HAS_SDCARD == 2 // use SD MMC host driver
useSDCard = SD_MMC.begin();
#endif
Expand Down

0 comments on commit 6c24aea

Please sign in to comment.