Loading...
Searching...
No Matches
mp_riot.h File Reference

MicroPython RIOT port core glue declarations. More...

Detailed Description

MicroPython RIOT port core glue declarations.

Author
Kaspar Schleiser kaspa.nosp@m.r@sc.nosp@m.hleis.nosp@m.er.d.nosp@m.e

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.
 

Function Documentation

◆ mp_riot_call_function_safe()

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.

Parameters
[in]callbackMicroPython callable to invoke with no arguments.