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

MicroPython RIOT specific API. More...

Detailed Description

MicroPython RIOT specific API.

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

Definition in file micropython.h.

#include <stdint.h>
+ Include dependency graph for micropython.h:

Go to the source code of this file.

#define MP_RIOT_HEAPSIZE   (16U*1024)
 Default heap size for MicroPython on RIOT.
 
#define MP_STACK_SAFEAREA   (128U)
 Safe area to leave free on the stack for interrupts and other unexpected stack usage.
 
void mp_riot_init (char *heap, size_t heap_size)
 Initialize RIOT MicroPython port.
 
void mp_riot_deinit (void)
 Tear down RIOT MicroPython port.
 

Macro Definition Documentation

◆ MP_RIOT_HEAPSIZE

#define MP_RIOT_HEAPSIZE   (16U*1024)

Default heap size for MicroPython on RIOT.

Use a reasonable default heap size.

Definition at line 33 of file micropython.h.

◆ MP_STACK_SAFEAREA

#define MP_STACK_SAFEAREA   (128U)

Safe area to leave free on the stack for interrupts and other unexpected stack usage.

Definition at line 41 of file micropython.h.

Function Documentation

◆ mp_riot_deinit()

void mp_riot_deinit ( void )

Tear down RIOT MicroPython port.

Releases the interpreter's state, so that a following mp_riot_init() call starts from a clean state instead of leaving stale references into the heap it is about to reset.

◆ mp_riot_init()

void mp_riot_init ( char * heap,
size_t heap_size )

Initialize RIOT MicroPython port.

Parameters
[in]heapptr to heap MicroPython should use
[in]heap_sizesize of heap