Lines Matching refs:out_csd
180 esp_err_t sdmmc_mmc_decode_csd(sdmmc_response_t response, sdmmc_csd_t* out_csd) in sdmmc_mmc_decode_csd() argument
182 out_csd->csd_ver = MMC_CSD_CSDVER(response); in sdmmc_mmc_decode_csd()
183 if (out_csd->csd_ver == MMC_CSD_CSDVER_1_0 || in sdmmc_mmc_decode_csd()
184 out_csd->csd_ver == MMC_CSD_CSDVER_2_0 || in sdmmc_mmc_decode_csd()
185 out_csd->csd_ver == MMC_CSD_CSDVER_EXT_CSD) { in sdmmc_mmc_decode_csd()
186 out_csd->mmc_ver = MMC_CSD_MMCVER(response); in sdmmc_mmc_decode_csd()
187 out_csd->capacity = MMC_CSD_CAPACITY(response); in sdmmc_mmc_decode_csd()
188 out_csd->read_block_len = MMC_CSD_READ_BL_LEN(response); in sdmmc_mmc_decode_csd()
190 ESP_LOGE(TAG, "unknown MMC CSD structure version 0x%x\n", out_csd->csd_ver); in sdmmc_mmc_decode_csd()
193 int read_bl_size = 1 << out_csd->read_block_len; in sdmmc_mmc_decode_csd()
194 out_csd->sector_size = MIN(read_bl_size, 512); in sdmmc_mmc_decode_csd()
195 if (out_csd->sector_size < read_bl_size) { in sdmmc_mmc_decode_csd()
196 out_csd->capacity *= read_bl_size / out_csd->sector_size; in sdmmc_mmc_decode_csd()
199 out_csd->tr_speed = 0; in sdmmc_mmc_decode_csd()