From 6ab2c5e6cc6359c3419a9d8ee61b4e586864d048 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Thu, 29 Sep 2016 10:13:17 -0700 Subject: lib/interrupt_char: Factor out typical Ctrl+C handling from esp8266 port. Utility functions for keyboard interrupt handling, to be reused across (baremetal) ports. --- esp8266/main.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'esp8266/main.c') diff --git a/esp8266/main.c b/esp8266/main.c index 71dfeb2ac6..22abb22d78 100644 --- a/esp8266/main.c +++ b/esp8266/main.c @@ -141,10 +141,6 @@ mp_obj_t mp_builtin_open(uint n_args, const mp_obj_t *args, mp_map_t *kwargs) { } MP_DEFINE_CONST_FUN_OBJ_KW(mp_builtin_open_obj, 1, mp_builtin_open); -void mp_keyboard_interrupt(void) { - MP_STATE_VM(mp_pending_exception) = MP_STATE_PORT(mp_kbd_exception); -} - void nlr_jump_fail(void *val) { printf("NLR jump failed\n"); for (;;) { -- cgit v1.2.3 From 161e9f411544357a4cce6e67a08b4ac9351d086a Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Wed, 5 Oct 2016 00:02:51 +0300 Subject: esp8266/main: Put /lib before / in sys.path. upip will use first non-empty component in sys.path as an install path (if MICROPYPATH envvar is not set, like it will be for baremetal targets). --- esp8266/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'esp8266/main.c') diff --git a/esp8266/main.c b/esp8266/main.c index 22abb22d78..c938dcb30b 100644 --- a/esp8266/main.c +++ b/esp8266/main.c @@ -49,8 +49,8 @@ STATIC void mp_reset(void) { mp_init(); mp_obj_list_init(mp_sys_path, 0); mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR_)); // current dir (or base dir of the script) - mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR__slash_)); mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR__slash_lib)); + mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR__slash_)); mp_obj_list_init(mp_sys_argv, 0); #if MICROPY_VFS_FAT memset(MP_STATE_PORT(fs_user_mount), 0, sizeof(MP_STATE_PORT(fs_user_mount))); -- cgit v1.2.3