remove esp32-micro-sdcard library

This commit is contained in:
cyberman54 2022-01-30 23:27:28 +01:00
parent 960fdfac2c
commit 353e55f0c2
3 changed files with 11 additions and 5 deletions

View File

@ -7,7 +7,7 @@
#if (HAS_SDCARD) #if (HAS_SDCARD)
#if HAS_SDCARD == 1 #if HAS_SDCARD == 1
#include <mySD.h> #include <SD.h>
#elif HAS_SDCARD == 2 #elif HAS_SDCARD == 2
#include <SD_MMC.h> #include <SD_MMC.h>
#else #else

View File

@ -16,10 +16,10 @@
;halfile = ttgov1.h ;halfile = ttgov1.h
;halfile = ttgov2.h ;halfile = ttgov2.h
;halfile = ttgov21old.h ;halfile = ttgov21old.h
halfile = ttgov21new.h ;halfile = ttgov21new.h
;halfile = ttgofox.h ;halfile = ttgofox.h
;halfile = ttgobeam.h ;halfile = ttgobeam.h
;halfile = ttgobeam10.h halfile = ttgobeam10.h
;halfile = ttgotdisplay.h ;halfile = ttgotdisplay.h
;halfile = ttgotwristband.h ;halfile = ttgotwristband.h
;halfile = fipy.h ;halfile = fipy.h
@ -85,7 +85,6 @@ lib_deps_basic =
makuna/RTC @ ^2.3.5 makuna/RTC @ ^2.3.5
spacehuhn/SimpleButton spacehuhn/SimpleButton
lewisxhe/AXP202X_Library @ ^1.1.3 lewisxhe/AXP202X_Library @ ^1.1.3
geeksville/esp32-micro-sdcard @ ^0.1.1
256dpi/MQTT @ ^2.4.8 256dpi/MQTT @ ^2.4.8
lib_deps_all = lib_deps_all =
${common.lib_deps_basic} ${common.lib_deps_basic}

View File

@ -15,6 +15,10 @@ static void openFile(void);
File fileSDCard; File fileSDCard;
#if HAS_SDCARD == 1
SPIClass sd_spi;
#endif
bool sdcard_init(bool create) { bool sdcard_init(bool create) {
// for usage of SD drivers on ESP32 platform see // for usage of SD drivers on ESP32 platform see
@ -23,7 +27,10 @@ bool sdcard_init(bool create) {
ESP_LOGI(TAG, "looking for SD-card..."); ESP_LOGI(TAG, "looking for SD-card...");
#if HAS_SDCARD == 1 // use SD SPI host driver #if HAS_SDCARD == 1 // use SD SPI host driver
useSDCard = SD.begin(SDCARD_CS, SDCARD_MOSI, SDCARD_MISO, SDCARD_SCLK); digitalWrite(SDCARD_CS, HIGH);
sd_spi.begin(SDCARD_SCLK, SDCARD_MISO, SDCARD_MOSI, SDCARD_CS);
digitalWrite(SDCARD_CS, LOW);
useSDCard = SD.begin(SDCARD_CS, sd_spi);
#elif HAS_SDCARD == 2 // use SD MMC host driver #elif HAS_SDCARD == 2 // use SD MMC host driver
// enable internal pullups of sd-data lines // enable internal pullups of sd-data lines
gpio_set_pull_mode(gpio_num_t(SDCARD_DATA0), GPIO_PULLUP_ONLY); gpio_set_pull_mode(gpio_num_t(SDCARD_DATA0), GPIO_PULLUP_ONLY);