nrf52dk-uart - Clear state on open.

Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/c09231e8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/c09231e8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/c09231e8

Branch: refs/heads/sterly_refactor
Commit: c09231e8aac8c9f067dbd51d0a1285c31e243ed7
Parents: aff82c3
Author: Christopher Collins <[email protected]>
Authored: Tue Aug 2 09:58:49 2016 -0700
Committer: Sterling Hughes <[email protected]>
Committed: Tue Aug 9 16:05:21 2016 -0700

----------------------------------------------------------------------
 hw/mcu/nordic/nrf52xxx/src/hal_uart.c | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/c09231e8/hw/mcu/nordic/nrf52xxx/src/hal_uart.c
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/nrf52xxx/src/hal_uart.c 
b/hw/mcu/nordic/nrf52xxx/src/hal_uart.c
index 2cf62d0..b7d3154 100644
--- a/hw/mcu/nordic/nrf52xxx/src/hal_uart.c
+++ b/hw/mcu/nordic/nrf52xxx/src/hal_uart.c
@@ -316,6 +316,8 @@ hal_uart_config(int port, int32_t baudrate, uint8_t 
databits, uint8_t stopbits,
     NRF_UARTE0->RXD.MAXCNT = sizeof(u->u_rx_buf);
     NRF_UARTE0->TASKS_STARTRX = 1;
 
+    u->u_rx_stall = 0;
+    u->u_tx_started = 0;
     u->u_open = 1;
 
     return 0;

Reply via email to