Skip to content

Commit fded46b

Browse files
committed
[LPC1768] Fix serial_clear
serial_clear() erroneously disabled the UART FIFOs. Reported by Adam Green.
1 parent e03e337 commit fded46b

File tree

1 file changed

+2
-1
lines changed
  • libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC176X

1 file changed

+2
-1
lines changed

libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC176X/serial_api.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,8 @@ int serial_writable(serial_t *obj) {
299299
}
300300

301301
void serial_clear(serial_t *obj) {
302-
obj->uart->FCR = 1 << 1 // rx FIFO reset
302+
obj->uart->FCR = 1 << 0 // FIFO Enable - 0 = Disables, 1 = Enabled
303+
| 1 << 1 // rx FIFO reset
303304
| 1 << 2 // tx FIFO reset
304305
| 0 << 6; // interrupt depth
305306
}

0 commit comments

Comments
 (0)