summaryrefslogtreecommitdiffstatshomepage
path: root/stmhal/usrsw.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-04-20 01:25:58 +0100
committerDamien George <damien.p.george@gmail.com>2014-04-20 01:25:58 +0100
commitfd6925b4b90761a535bd7b14be019b7870491b2f (patch)
tree26cda043235c4a069bcd8cd512a151aa0b5c1ebc /stmhal/usrsw.c
parentf87b35e7798f51acf48ecf9b2cbb25c607f16db6 (diff)
downloadmicropython-fd6925b4b90761a535bd7b14be019b7870491b2f.tar.gz
micropython-fd6925b4b90761a535bd7b14be019b7870491b2f.zip
stmhal: Small bug fixes and simplifications.
Diffstat (limited to 'stmhal/usrsw.c')
-rw-r--r--stmhal/usrsw.c4
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;