MicroPython RIOT port core glue declarations. More...
MicroPython RIOT port core glue declarations.
Definition in file mp_riot.h.
#include "py/obj.h"
Include dependency graph for mp_riot.h:Go to the source code of this file.
Functions | |
| void | mp_riot_call_function_safe (mp_obj_t callback) |
| Call a MicroPython callable from RIOT C code, safely. | |
| void mp_riot_call_function_safe | ( | mp_obj_t | callback | ) |
Call a MicroPython callable from RIOT C code, safely.
Invokes callback with no arguments inside an NLR frame, so that any uncaught Python exception is printed instead of propagating into the calling C code. Must be called from thread context (not from an ISR); use mp_sched_schedule_node() to defer ISR work to such a context.
| [in] | callback | MicroPython callable to invoke with no arguments. |