Skip to content

Commit 4fbf286

Browse files
committed
[LPC812] change ssp_busy() to check RXOV
1 parent 0a11767 commit 4fbf286

File tree

1 file changed

+3
-3
lines changed
  • libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC81X

1 file changed

+3
-3
lines changed

libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC81X/spi_api.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,9 @@ static inline int ssp_read(spi_t *obj) {
183183
}
184184

185185
static inline int ssp_busy(spi_t *obj) {
186-
// TODO
187-
return 0;
188-
}
186+
// checking RXOV(Receiver Overrun interrupt flag)
187+
return obj->spi->STAT & (1 << 2);
188+
}
189189

190190
int spi_master_write(spi_t *obj, int value) {
191191
ssp_write(obj, value);

0 commit comments

Comments
 (0)