Enable 1bit SDMMC for Olimex ESP32-EVB
Fixes: https://github.com/espressif/arduino-esp32/issues/495#issuecomment-31604 2612
This commit is contained in:
parent
91d02cc6d5
commit
2aed417d09
@ -34,7 +34,7 @@ SDMMCFS::SDMMCFS(FSImplPtr impl)
|
||||
: FS(impl), _card(NULL)
|
||||
{}
|
||||
|
||||
bool SDMMCFS::begin(const char * mountpoint)
|
||||
bool SDMMCFS::begin(const char * mountpoint, bool mode1bit)
|
||||
{
|
||||
if(_card) {
|
||||
return true;
|
||||
@ -43,7 +43,12 @@ bool SDMMCFS::begin(const char * mountpoint)
|
||||
sdmmc_slot_config_t slot_config = SDMMC_SLOT_CONFIG_DEFAULT();
|
||||
sdmmc_host_t host = SDMMC_HOST_DEFAULT();
|
||||
host.max_freq_khz = SDMMC_FREQ_HIGHSPEED;
|
||||
//host.flags = SDMMC_HOST_FLAG_1BIT; //use 1-line SD mode
|
||||
#ifdef BOARD_HAS_1BIT_SDMMC
|
||||
mode1bit = true;
|
||||
#endif
|
||||
if(mode1bit) {
|
||||
host.flags = SDMMC_HOST_FLAG_1BIT; //use 1-line SD mode
|
||||
}
|
||||
|
||||
esp_vfs_fat_sdmmc_mount_config_t mount_config = {
|
||||
.format_if_mount_failed = false,
|
||||
|
@ -28,7 +28,7 @@ protected:
|
||||
|
||||
public:
|
||||
SDMMCFS(FSImplPtr impl);
|
||||
bool begin(const char * mountpoint="/sdcard");
|
||||
bool begin(const char * mountpoint="/sdcard", bool mode1bit=false);
|
||||
void end();
|
||||
sdcard_type_t cardType();
|
||||
uint64_t cardSize();
|
||||
|
@ -25,4 +25,6 @@ static const uint8_t MOSI = 2;
|
||||
static const uint8_t MISO = 15;
|
||||
static const uint8_t SCK = 14;
|
||||
|
||||
#define BOARD_HAS_1BIT_SDMMC
|
||||
|
||||
#endif /* Pins_Arduino_h */
|
||||
|
Loading…
Reference in New Issue
Block a user