Wait conditions backward
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2159 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
4f97ee6dc0
commit
571bbc2402
@ -354,7 +354,7 @@ static inline uint16 spi_readword(FAR struct stm32_spidev_s *priv)
|
||||
{
|
||||
/* Wait until the receive buffer is not empty */
|
||||
|
||||
while ((spi_getreg(priv, STM32_SPI_SR_OFFSET) & SPI_SR_RXNE) != 0);
|
||||
while ((spi_getreg(priv, STM32_SPI_SR_OFFSET) & SPI_SR_RXNE) == 0);
|
||||
|
||||
/* Then return the received byte */
|
||||
|
||||
@ -380,7 +380,7 @@ static inline void spi_writeword(FAR struct stm32_spidev_s *priv, uint16 word)
|
||||
{
|
||||
/* Wait until the transmit buffer is empty */
|
||||
|
||||
while ((spi_getreg(priv, STM32_SPI_SR_OFFSET) & SPI_SR_TXE) != 0);
|
||||
while ((spi_getreg(priv, STM32_SPI_SR_OFFSET) & SPI_SR_TXE) == 0);
|
||||
|
||||
/* Then send the byte */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user