stm32/modmachine: Make machine_reset_cause_obj public.

To match the other functions in the machine module, in particular so that
MICROPY_PY_MACHINE can be disabled without getting a compiler warning about
unused code.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George 2023-07-11 13:45:53 +10:00
parent dd8de8b412
commit 7bced2eaec
2 changed files with 2 additions and 1 deletions

View File

@ -387,7 +387,7 @@ MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(machine_deepsleep_obj, 0, 1, machine_deepsle
STATIC mp_obj_t machine_reset_cause(void) { STATIC mp_obj_t machine_reset_cause(void) {
return MP_OBJ_NEW_SMALL_INT(reset_cause); return MP_OBJ_NEW_SMALL_INT(reset_cause);
} }
STATIC MP_DEFINE_CONST_FUN_OBJ_0(machine_reset_cause_obj, machine_reset_cause); MP_DEFINE_CONST_FUN_OBJ_0(machine_reset_cause_obj, machine_reset_cause);
#if MICROPY_PY_MACHINE #if MICROPY_PY_MACHINE

View File

@ -48,6 +48,7 @@ MP_DECLARE_CONST_FUN_OBJ_VAR_BETWEEN(machine_freq_obj);
MP_DECLARE_CONST_FUN_OBJ_0(machine_idle_obj); MP_DECLARE_CONST_FUN_OBJ_0(machine_idle_obj);
MP_DECLARE_CONST_FUN_OBJ_VAR_BETWEEN(machine_lightsleep_obj); MP_DECLARE_CONST_FUN_OBJ_VAR_BETWEEN(machine_lightsleep_obj);
MP_DECLARE_CONST_FUN_OBJ_VAR_BETWEEN(machine_deepsleep_obj); MP_DECLARE_CONST_FUN_OBJ_VAR_BETWEEN(machine_deepsleep_obj);
MP_DECLARE_CONST_FUN_OBJ_0(machine_reset_cause_obj);
MP_DECLARE_CONST_FUN_OBJ_0(machine_disable_irq_obj); MP_DECLARE_CONST_FUN_OBJ_0(machine_disable_irq_obj);
MP_DECLARE_CONST_FUN_OBJ_VAR_BETWEEN(machine_enable_irq_obj); MP_DECLARE_CONST_FUN_OBJ_VAR_BETWEEN(machine_enable_irq_obj);