Code: Select all
typedef struct {
sdmmc_host_t host;
uint32_t ocr;
sdmmc_cid_t cid;
sdmmc_csd_t csd;
sdmmc_scr_t scr;
sdmmc_ext_csd_t ext_csd; <<<
uint16_t rca;
uint16_t max_freq_khz;
uint32_t is_mem : 1;
uint32_t is_sdio : 1;
uint32_t is_mmc : 1;
uint32_t num_io_functions : 3;
uint32_t log_bus_width : 2;
uint32_t is_ddr : 1;
uint32_t reserved : 23;
} sdmmc_card_t;
Code: Select all
typedef struct {
uint8_t power_class; <<<
} sdmmc_ext_csd_t;
Code: Select all
uint8_t ecsd[EXT_CSD_MMC_SIZE] = {};
sdmmc_command_t cmd;
cmd.opcode = MMC_SEND_EXT_CSD;
cmd.arg = 0;
cmd.response[0] = 0;
cmd.response[1] = 0;
cmd.response[2] = 0;
cmd.response[3] = 0;
cmd.data = &ecsd;
cmd.datalen = 0;
cmd.blklen = 1;
cmd.flags = SCF_RSP_R1 | SCF_CMD_ADTC;
cmd.error = 0;
cmd.timeout_ms = 100;
Serial.println("sdmmc_host_do_transaction");
lerr = host.do_transaction(SDMMC_HOST_SLOT_1, &cmd);
Serial.println(esp_err_to_name(lerr));
Serial.println("sdmmc_command_t error field");
Serial.println(esp_err_to_name(cmd.error));
Code: Select all
cmd.flags = ???