@@ -42,7 +42,21 @@ bool SDMMCFS::begin(const char * mountpoint, bool mode1bit)
42
42
}
43
43
// mount
44
44
sdmmc_slot_config_t slot_config = SDMMC_SLOT_CONFIG_DEFAULT ();
45
- sdmmc_host_t host = SDMMC_HOST_DEFAULT ();
45
+ sdmmc_host_t host = {
46
+ .flags = SDMMC_HOST_FLAG_4BIT,
47
+ .slot = SDMMC_HOST_SLOT_1,
48
+ .max_freq_khz = SDMMC_FREQ_DEFAULT,
49
+ .io_voltage = 3 .3f ,
50
+ .init = &sdmmc_host_init,
51
+ .set_bus_width = &sdmmc_host_set_bus_width,
52
+ .get_bus_width = &sdmmc_host_get_slot_width,
53
+ .set_card_clk = &sdmmc_host_set_card_clk,
54
+ .do_transaction = &sdmmc_host_do_transaction,
55
+ .deinit = &sdmmc_host_deinit,
56
+ .io_int_enable = sdmmc_host_io_int_enable,
57
+ .io_int_wait = sdmmc_host_io_int_wait,
58
+ .command_timeout_ms = 0 ,
59
+ };
46
60
host.max_freq_khz = SDMMC_FREQ_HIGHSPEED;
47
61
#ifdef BOARD_HAS_1BIT_SDMMC
48
62
mode1bit = true ;
@@ -53,7 +67,8 @@ bool SDMMCFS::begin(const char * mountpoint, bool mode1bit)
53
67
54
68
esp_vfs_fat_sdmmc_mount_config_t mount_config = {
55
69
.format_if_mount_failed = false ,
56
- .max_files = 5
70
+ .max_files = 5 ,
71
+ .allocation_unit_size = 0
57
72
};
58
73
59
74
esp_err_t ret = esp_vfs_fat_sdmmc_mount (mountpoint, &host, &slot_config, &mount_config, &_card);
0 commit comments