Skip to content

Commit a002bad

Browse files
lbernstoneme-no-dev
authored andcommitted
Updated SD_MMC init to match changes upstream
1 parent 1bc5d39 commit a002bad

File tree

1 file changed

+15
-16
lines changed

1 file changed

+15
-16
lines changed

libraries/SD_MMC/src/SD_MMC.cpp

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -43,22 +43,21 @@ bool SDMMCFS::begin(const char * mountpoint, bool mode1bit, bool format_if_mount
4343
}
4444
//mount
4545
sdmmc_slot_config_t slot_config = SDMMC_SLOT_CONFIG_DEFAULT();
46-
sdmmc_host_t host = {
47-
.flags = SDMMC_HOST_FLAG_4BIT,
48-
.slot = SDMMC_HOST_SLOT_1,
49-
.max_freq_khz = SDMMC_FREQ_DEFAULT,
50-
.io_voltage = 3.3f,
51-
.init = &sdmmc_host_init,
52-
.set_bus_width = &sdmmc_host_set_bus_width,
53-
.get_bus_width = &sdmmc_host_get_slot_width,
54-
.set_bus_ddr_mode = &sdmmc_host_set_bus_ddr_mode,
55-
.set_card_clk = &sdmmc_host_set_card_clk,
56-
.do_transaction = &sdmmc_host_do_transaction,
57-
.deinit = &sdmmc_host_deinit,
58-
.io_int_enable = &sdmmc_host_io_int_enable,
59-
.io_int_wait = &sdmmc_host_io_int_wait,
60-
.command_timeout_ms = 0
61-
};
46+
sdmmc_host_t host;
47+
host.flags = SDMMC_HOST_FLAG_4BIT;
48+
host.slot = SDMMC_HOST_SLOT_1;
49+
host.max_freq_khz = SDMMC_FREQ_DEFAULT;
50+
host.io_voltage = 3.3f;
51+
host.init = &sdmmc_host_init;
52+
host.set_bus_width = &sdmmc_host_set_bus_width;
53+
host.get_bus_width = &sdmmc_host_get_slot_width;
54+
host.set_bus_ddr_mode = &sdmmc_host_set_bus_ddr_mode;
55+
host.set_card_clk = &sdmmc_host_set_card_clk;
56+
host.do_transaction = &sdmmc_host_do_transaction;
57+
host.deinit_p = &sdspi_host_remove_device;
58+
host.io_int_enable = &sdmmc_host_io_int_enable;
59+
host.io_int_wait = &sdmmc_host_io_int_wait;
60+
host.command_timeout_ms = 0;
6261
host.max_freq_khz = SDMMC_FREQ_HIGHSPEED;
6362
#ifdef BOARD_HAS_1BIT_SDMMC
6463
mode1bit = true;

0 commit comments

Comments
 (0)