diff options
| author | Glenn Ruben Bakke <glennbakke@gmail.com> | 2017-06-03 23:23:08 +0200 |
|---|---|---|
| committer | Glenn Ruben Bakke <glennbakke@gmail.com> | 2017-06-03 23:23:08 +0200 |
| commit | 227eeb1408cd442e896c33fd82d1d709ee9c95cd (patch) | |
| tree | 7dfd4bf6894d59c299107960c47bace77cf166df /lib/utils | |
| parent | d83c4fa130692ed9dbdfbe1bb8903da5721e7734 (diff) | |
| parent | a0dbbbebb8c0286e00ae06751b0173cbca4ec801 (diff) | |
Merge remote-tracking branch 'upstream/master' into nrf5_no_sdk
Diffstat (limited to 'lib/utils')
| -rw-r--r-- | lib/utils/interrupt_char.c | 12 | ||||
| -rw-r--r-- | lib/utils/stdout_helpers.c | 2 |
2 files changed, 5 insertions, 9 deletions
diff --git a/lib/utils/interrupt_char.c b/lib/utils/interrupt_char.c index 344db88c7..fca0f95b5 100644 --- a/lib/utils/interrupt_char.c +++ b/lib/utils/interrupt_char.c @@ -27,28 +27,24 @@ #include "py/obj.h" #include "py/mpstate.h" +#if MICROPY_KBD_EXCEPTION + int mp_interrupt_char; void mp_hal_set_interrupt_char(int c) { if (c != -1) { - #if MICROPY_KBD_EXCEPTION mp_obj_exception_clear_traceback(MP_OBJ_FROM_PTR(&MP_STATE_VM(mp_kbd_exception))); - #else - mp_obj_exception_clear_traceback(MP_STATE_PORT(mp_kbd_exception)); - #endif } mp_interrupt_char = c; } void mp_keyboard_interrupt(void) { - #if MICROPY_KBD_EXCEPTION MP_STATE_VM(mp_pending_exception) = MP_OBJ_FROM_PTR(&MP_STATE_VM(mp_kbd_exception)); - #else - MP_STATE_VM(mp_pending_exception) = MP_STATE_PORT(mp_kbd_exception); - #endif #if MICROPY_ENABLE_SCHEDULER if (MP_STATE_VM(sched_state) == MP_SCHED_IDLE) { MP_STATE_VM(sched_state) = MP_SCHED_PENDING; } #endif } + +#endif diff --git a/lib/utils/stdout_helpers.c b/lib/utils/stdout_helpers.c index 5f7a17d32..3de119757 100644 --- a/lib/utils/stdout_helpers.c +++ b/lib/utils/stdout_helpers.c @@ -9,7 +9,7 @@ * implementation below can be used. */ -// Send "cooked" string of given length, where every occurance of +// Send "cooked" string of given length, where every occurrence of // LF character is replaced with CR LF. void mp_hal_stdout_tx_strn_cooked(const char *str, size_t len) { while (len--) { |
