diff options
| author | Scott Shawcroft <scott@tannewt.org> | 2018-05-16 17:52:16 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-05-16 17:52:16 -0400 |
| commit | 6a8db03ade64bd2fdf5c7b5df54ad113a062e005 (patch) | |
| tree | ea667ec04968450be04b68188cba2a45b7bcee17 /py/runtime.c | |
| parent | 07c0a3227da24ef92e44a2457f94af71cc7f081c (diff) | |
| parent | 918d30cb97c8d15ad27c6a59f68c55dc211b425a (diff) | |
Merge pull request #838 from rhooper/master
add supervisor.reload() to soft reboot from code
Diffstat (limited to 'py/runtime.c')
| -rw-r--r-- | py/runtime.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/py/runtime.c b/py/runtime.c index cbec82f17..a7ff57a47 100644 --- a/py/runtime.c +++ b/py/runtime.c @@ -84,6 +84,12 @@ void mp_init(void) { MP_STATE_VM(mp_kbd_exception).args = (mp_obj_tuple_t*)&mp_const_empty_tuple_obj; #endif + MP_STATE_VM(mp_reload_exception).base.type = &mp_type_ReloadException; + MP_STATE_VM(mp_reload_exception).traceback_alloc = 0; + MP_STATE_VM(mp_reload_exception).traceback_len = 0; + MP_STATE_VM(mp_reload_exception).traceback_data = NULL; + MP_STATE_VM(mp_reload_exception).args = (mp_obj_tuple_t*)&mp_const_empty_tuple_obj; + // call port specific initialization if any #ifdef MICROPY_PORT_INIT_FUNC MICROPY_PORT_INIT_FUNC; |
