mirror of https://github.com/ARMmbed/mbed-os.git
fix qspi address sending for nrf52
fix address sending in qspi_command_transfer now address is send MSB firstpull/7925/head
parent
c836b79e37
commit
3a64383de5
|
@ -29,5 +29,4 @@
|
|||
#undef QSPI_CMD_READ_1IO
|
||||
#define QSPI_CMD_READ_1IO QSPI_CMD_READ_1IO_FAST
|
||||
|
||||
|
||||
#endif // MBED_QSPI_FLASH_CONFIG_H
|
||||
|
|
|
@ -298,8 +298,10 @@ qspi_status_t qspi_command_transfer(qspi_t *obj, const qspi_command_t *command,
|
|||
} else {
|
||||
return QSPI_STATUS_INVALID_PARAMETER;
|
||||
}
|
||||
for (uint32_t i = 0; i < (uint32_t)qspi_cinstr_config.length - 1; ++i) {
|
||||
data[i] = ((uint8_t *)&command->address.value)[i];
|
||||
uint32_t address_size = (uint32_t)qspi_cinstr_config.length - 1;
|
||||
uint8_t *address_bytes = (uint8_t *)&command->address.value;
|
||||
for (uint32_t i = 0; i < address_size; ++i) {
|
||||
data[i] = address_bytes[address_size - 1 - i];
|
||||
}
|
||||
} else if (data_size < 9) {
|
||||
qspi_cinstr_config.length = (nrf_qspi_cinstr_len_t)(NRF_QSPI_CINSTR_LEN_1B + data_size);
|
||||
|
|
Loading…
Reference in New Issue