diff options
author | Damien George <damien.p.george@gmail.com> | 2019-05-22 12:46:09 +1000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2019-05-22 12:47:48 +1000 |
commit | 9cf1cbb0575387d79b496b6ff14736ca9239c0a1 (patch) | |
tree | 48188107dffdaf7b6d23c2462ef8f9f80eb23943 | |
parent | 456c89f7497d55e641e4374a1860ba08f3b84688 (diff) |
nrf/mphalport: Use wfi to save power while waiting at the UART REPL.
-rw-r--r-- | ports/nrf/mphalport.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ports/nrf/mphalport.c b/ports/nrf/mphalport.c index 9ce904514..a050df147 100644 --- a/ports/nrf/mphalport.c +++ b/ports/nrf/mphalport.c @@ -58,6 +58,7 @@ int mp_hal_stdin_rx_chr(void) { if (MP_STATE_PORT(board_stdio_uart) != NULL && uart_rx_any(MP_STATE_PORT(board_stdio_uart))) { return uart_rx_char(MP_STATE_PORT(board_stdio_uart)); } + __WFI(); } return 0; |