Skip to content
Snippets Groups Projects
Commit d2e5ecdb authored by iggy's avatar iggy
Browse files

FIX: get the global ctx for every mpy call, otherwise it does not work after a soft reboot

parent 8b0d8327
No related branches found
No related tags found
No related merge requests found
......@@ -123,9 +123,7 @@ STATIC mp_obj_t mp_update_leds(size_t n_args, const mp_obj_t *args) {
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mp_update_leds_obj, 0, 2, mp_update_leds);
STATIC mp_obj_t mp_get_ctx(size_t n_args, const mp_obj_t *args) {
if (mp_ctx == NULL) {
mp_ctx = mp_ctx_from_ctx(the_ctx);
}
return mp_ctx;
}
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mp_get_ctx_obj, 0, 0, mp_get_ctx);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment