main/task_sdcard.c

changeset 119
1cef3c25426b
parent 106
191dccfe4252
equal deleted inserted replaced
118:ae30613ffa6f 119:1cef3c25426b
462 json_log = malloc(sizeof(JSON_log)); 462 json_log = malloc(sizeof(JSON_log));
463 463
464 ESP_LOGI(TAG, "Start SD card"); 464 ESP_LOGI(TAG, "Start SD card");
465 sdmmc_host_t host = SDSPI_HOST_DEFAULT(); 465 sdmmc_host_t host = SDSPI_HOST_DEFAULT();
466 host.slot = SDCARD_HOST_SLOT; // HSPI_HOST is in use by the TFT. 466 host.slot = SDCARD_HOST_SLOT; // HSPI_HOST is in use by the TFT.
467 //host.flags = SDMMC_HOST_FLAG_SPI | SDMMC_HOST_FLAG_DEINIT_ARG | SDMMC_HOST_FLAG_1BIT;
468 //host.max_freq_khz = 10000;
469 spi_bus_config_t bus_cfg = { 467 spi_bus_config_t bus_cfg = {
470 .mosi_io_num = SDCARD_PIN_NUM_MOSI, 468 .mosi_io_num = SDCARD_PIN_NUM_MOSI,
471 .miso_io_num = SDCARD_PIN_NUM_MISO, 469 .miso_io_num = SDCARD_PIN_NUM_MISO,
472 .sclk_io_num = SDCARD_PIN_NUM_CLK, 470 .sclk_io_num = SDCARD_PIN_NUM_CLK,
473 .quadwp_io_num = -1, 471 .quadwp_io_num = -1,

mercurial