kopia lustrzana https://github.com/micropython/micropython
nrf/mphalport: Use wfi to save power while waiting at the UART REPL.
rodzic
456c89f749
commit
9cf1cbb057
|
@ -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))) {
|
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));
|
return uart_rx_char(MP_STATE_PORT(board_stdio_uart));
|
||||||
}
|
}
|
||||||
|
__WFI();
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Ładowanie…
Reference in New Issue