From 1e39c9a454612e535878350873a3fcc76a2edc88 Mon Sep 17 00:00:00 2001 From: William Huang Date: Mon, 21 Jul 2014 23:25:12 -0400 Subject: [PATCH] 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 --- cpu/cc2538/spi-arch.h | 1 - 1 file changed, 1 deletion(-) diff --git a/cpu/cc2538/spi-arch.h b/cpu/cc2538/spi-arch.h index 53d7fe78d..c42aa5b04 100644 --- a/cpu/cc2538/spi-arch.h +++ b/cpu/cc2538/spi-arch.h @@ -63,7 +63,6 @@ #error "You must include spi-arch.h before spi.h for the CC2538." #endif #define SPI_FLUSH() do { \ - SPI_WAITFOREORx(); \ while (REG(SSI0_BASE + SSI_SR) & SSI_SR_RNE) { \ SPI_RXBUF; \ } \