nrf: Option to enable Ctrl-C in NUS console.

Costs 136 bytes on a nRF51822.
This commit is contained in:
Ayke van Laethem
2017-11-26 21:58:25 +01:00
committed by Damien George
parent 03b8429c0c
commit a248db6916
5 changed files with 22 additions and 8 deletions

View File

@@ -44,11 +44,13 @@ NORETURN void mp_hal_raise(HAL_StatusTypeDef status) {
nlr_raise(mp_obj_new_exception_arg1(&mp_type_OSError, MP_OBJ_NEW_SMALL_INT(mp_hal_status_to_errno_table[status])));
}
#if !MICROPY_KBD_EXCEPTION
void mp_hal_set_interrupt_char(int c) {
}
#endif
#if (MICROPY_PY_BLE_NUS == 0)
#if !MICROPY_PY_BLE_NUS
int mp_hal_stdin_rx_chr(void) {
for (;;) {
if (MP_STATE_PORT(pyb_stdio_uart) != NULL && uart_rx_any(MP_STATE_PORT(pyb_stdio_uart))) {