Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development #609

Merged
merged 2 commits into from
Jun 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
7 changes: 1 addition & 6 deletions src/hal/ttgov21new.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,7 @@
#define CFG_sx1276_radio 1 // HPD13A LoRa SoC

// enable only if you want to store a local paxcount table on the device
#define HAS_SDCARD 1 // this board has an SD-card-reader/writer
// Pins for SD-card
#define SDCARD_CS (13)
#define SDCARD_MOSI (15)
#define SDCARD_MISO (2)
#define SDCARD_SCLK (14)
#define HAS_SDCARD 2 // this board has an SD-card-reader/writer

#define HAS_DISPLAY 1
#define HAS_LED (25) // green on board LED
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