diff options
Diffstat (limited to 'stmhal/usrsw.c')
-rw-r--r-- | stmhal/usrsw.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/stmhal/usrsw.c b/stmhal/usrsw.c index 0d5d7e9b0c..72f9ec28cc 100644 --- a/stmhal/usrsw.c +++ b/stmhal/usrsw.c @@ -69,8 +69,8 @@ static mp_obj_t pyb_switch(uint n_args, mp_obj_t *args) { // may have been disabled by an exception in the interrupt, or the // user disabling the line explicitly. extint_register((mp_obj_t)&MICROPY_HW_USRSW_PIN, - MP_OBJ_NEW_SMALL_INT(MICROPY_HW_USRSW_EXTI_MODE), - MP_OBJ_NEW_SMALL_INT(MICROPY_HW_USRSW_PULL), + MICROPY_HW_USRSW_EXTI_MODE, + MICROPY_HW_USRSW_PULL, switch_user_callback_obj == mp_const_none ? mp_const_none : (mp_obj_t)&switch_callback_obj, true, NULL); return mp_const_none; |