From 10616ffc52d3dbe6a89306279f41d56d712208ec Mon Sep 17 00:00:00 2001 From: Klaus K Wilting Date: Sat, 16 May 2020 18:01:00 +0200 Subject: [PATCH] sdcard fix --- README.md | 4 ++-- src/sdcard.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 864cee17..474a7bc1 100644 --- a/README.md +++ b/README.md @@ -207,9 +207,9 @@ There in the sensor configuration select "TheThingsNetwork" and set Decoding Pro # SD-card Data can be stored on an SD-card if one is availabe. Simply choose the file in src/hal and add the following lines to your hal-file: - #define HAS_SDCARD 1 // this board has an SD-card-reader/writer, with SPI interface + #define HAS_SDCARD 1 // SD-card-reader/writer, using SPI interface OR - #define HAS_SDCARD 2 // this board has an SD-card-reader/writer, using native SD interface + #define HAS_SDCARD 2 // SD-card-reader/writer, using SDMMC interface // Pins for SD-card #define SDCARD_CS (13) // fill in the correct numbers for your board diff --git a/src/sdcard.cpp b/src/sdcard.cpp index 3b573c70..cd6b8618 100644 --- a/src/sdcard.cpp +++ b/src/sdcard.cpp @@ -16,7 +16,7 @@ File fileSDCard; bool sdcard_init() { ESP_LOGI(TAG, "looking for SD-card..."); #if HAS_SDCARD == 1 - pinMode(SS, OUTPUT); + pinMode(SDCARD_CS, OUTPUT); useSDCard = SD.begin(SDCARD_CS, SDCARD_MOSI, SDCARD_MISO, SDCARD_SCLK); #elif HAS_SDCARD == 2 useSDCard = SD_MMC.begin();