Fix use-before-set variable in spi drv for nrf52

pull/47/head
Daniele Lacamera 2020-05-19 09:13:58 +02:00
parent f7da6c5f6e
commit 45055a43c8
1 changed files with 1 additions and 0 deletions

View File

@ -88,6 +88,7 @@ void spi_write(const char byte)
uint32_t reg;
SPI_EV_RDY = 0;
SPI_TXDATA = (uint32_t)byte;
reg = SPI_EV_RDY;
while (!reg)
reg = SPI_EV_RDY;
}