Skip to content

Commit 45055a4

Browse files
committed
Fix use-before-set variable in spi drv for nrf52
1 parent f7da6c5 commit 45055a4

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

hal/spi/spi_drv_nrf52.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ void spi_write(const char byte)
8888
uint32_t reg;
8989
SPI_EV_RDY = 0;
9090
SPI_TXDATA = (uint32_t)byte;
91+
reg = SPI_EV_RDY;
9192
while (!reg)
9293
reg = SPI_EV_RDY;
9394
}

0 commit comments

Comments
 (0)