QUADSPI - Fix quadSpiTransmit1LINE when writing 1 or more bytes… (#9100)

QUADSPI - Fix quadSpiTransmit1LINE when writing 1 or more bytes of data.
This commit is contained in:
Michael Keller 2019-10-27 15:23:13 +13:00 committed by GitHub
commit 40062953b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -232,7 +232,7 @@ bool quadSpiTransmit1LINE(QUADSPI_TypeDef *instance, uint8_t instruction, uint8_
status = HAL_QSPI_Command(&quadSpiDevice[device].hquadSpi, &cmd, QUADSPI_DEFAULT_TIMEOUT);
bool timeout = (status != HAL_OK);
if (!timeout) {
if (out && length == 0) {
if (out && length > 0) {
status = HAL_QSPI_Transmit(&quadSpiDevice[device].hquadSpi, (uint8_t *)out, QUADSPI_DEFAULT_TIMEOUT);
timeout = (status != HAL_OK);
}