From fd6925b4b90761a535bd7b14be019b7870491b2f Mon Sep 17 00:00:00 2001 From: Damien George Date: Sun, 20 Apr 2014 01:25:58 +0100 Subject: stmhal: Small bug fixes and simplifications. --- stmhal/usrsw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'stmhal/usrsw.c') diff --git a/stmhal/usrsw.c b/stmhal/usrsw.c index 0d5d7e9b0..72f9ec28c 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; -- cgit v1.2.3