1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-15 04:15:44 +03:00

FIX: Flash status compilation error (#12360)

This commit is contained in:
J Blackman 2023-02-14 20:12:58 +11:00 committed by GitHub
parent 14eac2d6c8
commit fd2ac2f77f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -145,7 +145,7 @@ static uint8_t m25p16_page_buffer[M25P16_PAGESIZE];
static uint8_t m25p16_readStatus(flashDevice_t *fdevice)
{
uint8_t status;
uint8_t status = 0;
if (fdevice->io.mode == FLASHIO_SPI) {
STATIC_DMA_DATA_AUTO uint8_t readStatus[2] = { M25P16_INSTRUCTION_READ_STATUS_REG, 0 };
STATIC_DMA_DATA_AUTO uint8_t readyStatus[2];
@ -153,12 +153,13 @@ static uint8_t m25p16_readStatus(flashDevice_t *fdevice)
spiReadWriteBuf(fdevice->io.handle.dev, readStatus, readyStatus, sizeof(readStatus));
status = readyStatus[1];
}
} else {
#ifdef USE_QUADSPI
else if (fdevice->io.mode == FLASHIO_QUADSPI) {
if (fdevice->io.mode == FLASHIO_QUADSPI) {
quadSpiReceive1LINE(fdevice->io.handle.quadSpi, M25P16_INSTRUCTION_READ_STATUS_REG, 0, &status, 1);
}
#endif
}
return status;
}