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:
parent
14eac2d6c8
commit
fd2ac2f77f
1 changed files with 5 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue