Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions ports/riot/modriot.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,14 @@ STATIC mp_obj_t mod_thread_getpid(void) {
}
STATIC MP_DEFINE_CONST_FUN_OBJ_0(mod_thread_getpid_obj, mod_thread_getpid);

extern const mp_obj_module_t mp_module_riot_saul;

STATIC const mp_rom_map_elem_t mp_module_riot_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_riot) },
{ MP_ROM_QSTR(MP_QSTR_thread_getpid), MP_ROM_PTR(&mod_thread_getpid_obj) },
#if MICROPY_PY_RIOT_SAUL
{ MP_ROM_QSTR(MP_QSTR_saul), MP_ROM_PTR(&mp_module_riot_saul)},
#endif
};

STATIC MP_DEFINE_CONST_DICT(mp_module_riot_globals, mp_module_riot_globals_table);
Expand Down
3 changes: 3 additions & 0 deletions ports/riot/mpconfigport.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@
#define MICROPY_PY_MACHINE_ADC (1)
#endif
#define MICROPY_PY_MACHINE_SPI_MAKE_NEW machine_hw_spi_make_new
#ifdef MODULE_SAUL
#define MICROPY_PY_RIOT_SAUL (1)
#endif
#ifdef CONFIG_NETWORKING
// If we have networking, we likely want errno comfort
#define MICROPY_PY_UERRNO (1)
Expand Down
Loading