mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
driver: sdspi: fix decoding of R2 response
This commit is contained in:
parent
17b7981e2e
commit
f1e3536f3c
@ -156,7 +156,7 @@ esp_err_t sdspi_host_do_transaction(int slot, sdmmc_command_t *cmdinfo)
|
||||
cmdinfo->response[0] = hw_cmd.r1;
|
||||
r1_response_to_err(hw_cmd.r1, cmdinfo->opcode, &ret);
|
||||
} else if (flags & SDSPI_CMD_FLAG_RSP_R2) {
|
||||
cmdinfo->response[0] = (((uint32_t)hw_cmd.r1) << 8) | (hw_cmd.response[0] >> 24);
|
||||
cmdinfo->response[0] = ((uint32_t)hw_cmd.r1) | ((hw_cmd.response[0] & 0xff) << 8);
|
||||
} else if (flags & (SDSPI_CMD_FLAG_RSP_R3 | SDSPI_CMD_FLAG_RSP_R7)) {
|
||||
r1_response_to_err(hw_cmd.r1, cmdinfo->opcode, &ret);
|
||||
cmdinfo->response[0] = __builtin_bswap32(hw_cmd.response[0]);
|
||||
|
Loading…
Reference in New Issue
Block a user