summaryrefslogtreecommitdiff
path: root/ports/stm32/modmachine.c
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2022-05-31 22:56:11 +1000
committerDamien George <damien@micropython.org>2022-06-02 16:31:37 +1000
commitefe23aca7154d21a9e8f283313c7a1ac29e05d86 (patch)
tree385afed48501b70d94ac3869901ad6fd809201f8 /ports/stm32/modmachine.c
parent47f634300c5572571816817f16836113c98814ae (diff)
all: Remove third argument to MP_REGISTER_MODULE.
It's no longer needed because this macro is now processed after preprocessing the source code via cpp (in the qstr extraction stage), which means unused MP_REGISTER_MODULE's are filtered out by the preprocessor. Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'ports/stm32/modmachine.c')
-rw-r--r--ports/stm32/modmachine.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ports/stm32/modmachine.c b/ports/stm32/modmachine.c
index 20140ed10..5fca9b3e0 100644
--- a/ports/stm32/modmachine.c
+++ b/ports/stm32/modmachine.c
@@ -396,6 +396,8 @@ STATIC mp_obj_t machine_reset_cause(void) {
}
STATIC MP_DEFINE_CONST_FUN_OBJ_0(machine_reset_cause_obj, machine_reset_cause);
+#if MICROPY_PY_MACHINE
+
STATIC const mp_rom_map_elem_t machine_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_umachine) },
{ MP_ROM_QSTR(MP_QSTR_info), MP_ROM_PTR(&machine_info_obj) },
@@ -481,4 +483,6 @@ const mp_obj_module_t mp_module_machine = {
.globals = (mp_obj_dict_t *)&machine_module_globals,
};
-MP_REGISTER_MODULE(MP_QSTR_umachine, mp_module_machine, MICROPY_PY_MACHINE);
+MP_REGISTER_MODULE(MP_QSTR_umachine, mp_module_machine);
+
+#endif // MICROPY_PY_MACHINE