mirror of
https://github.com/oliverschmidt/contiki.git
synced 2025-08-09 17:25:00 +00:00
fixed SPI_FLUSH. current implementation waits for rx buffer to fill first. Thus, if we call SPI_FLUSH to make sure the rx fifo is empty when the rx fifo is already empty, we enter an infinite loop
This commit is contained in:
@@ -63,7 +63,6 @@
|
|||||||
#error "You must include spi-arch.h before spi.h for the CC2538."
|
#error "You must include spi-arch.h before spi.h for the CC2538."
|
||||||
#endif
|
#endif
|
||||||
#define SPI_FLUSH() do { \
|
#define SPI_FLUSH() do { \
|
||||||
SPI_WAITFOREORx(); \
|
|
||||||
while (REG(SSI0_BASE + SSI_SR) & SSI_SR_RNE) { \
|
while (REG(SSI0_BASE + SSI_SR) & SSI_SR_RNE) { \
|
||||||
SPI_RXBUF; \
|
SPI_RXBUF; \
|
||||||
} \
|
} \
|
||||||
|
Reference in New Issue
Block a user