From 674bf1bc81ab358d167965f06e5c51f86027b050 Mon Sep 17 00:00:00 2001 From: Damien George Date: Thu, 14 Apr 2016 11:15:43 +0100 Subject: esp8266: Add hard IRQ callbacks for pin change on GPIO0-15. --- esp8266/main.c | 1 + 1 file changed, 1 insertion(+) (limited to 'esp8266/main.c') diff --git a/esp8266/main.c b/esp8266/main.c index 08085299ba..518ecf17d2 100644 --- a/esp8266/main.c +++ b/esp8266/main.c @@ -53,6 +53,7 @@ STATIC void mp_reset(void) { #endif MP_STATE_PORT(mp_kbd_exception) = mp_obj_new_exception(&mp_type_KeyboardInterrupt); MP_STATE_PORT(term_obj) = MP_OBJ_NULL; + pin_init0(); #if MICROPY_MODULE_FROZEN pyexec_frozen_module("_boot"); pyexec_file("boot.py"); -- cgit v1.2.3 From fb5017f9dc1dfc3440f0688b1b001983cbac59c1 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Tue, 3 May 2016 18:21:50 +0300 Subject: esp8266/main: Set sys.path to ["", "/", "/lib"]. --- esp8266/main.c | 3 +++ esp8266/qstrdefsport.h | 4 ++++ 2 files changed, 7 insertions(+) (limited to 'esp8266/main.c') diff --git a/esp8266/main.c b/esp8266/main.c index 518ecf17d2..45ee85ac88 100644 --- a/esp8266/main.c +++ b/esp8266/main.c @@ -47,6 +47,9 @@ STATIC void mp_reset(void) { gc_init(heap, heap + sizeof(heap)); 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_init(mp_sys_argv, 0); #if MICROPY_VFS_FAT memset(MP_STATE_PORT(fs_user_mount), 0, sizeof(MP_STATE_PORT(fs_user_mount))); diff --git a/esp8266/qstrdefsport.h b/esp8266/qstrdefsport.h index d875d8d2a1..7610eb33da 100644 --- a/esp8266/qstrdefsport.h +++ b/esp8266/qstrdefsport.h @@ -25,3 +25,7 @@ */ // qstrs specific to this port, only needed if they aren't auto-generated + +// Entries for sys.path +Q(/) +Q(/lib) -- cgit v1.2.3