diff options
Diffstat (limited to 'stm/timer.c')
-rw-r--r-- | stm/timer.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/stm/timer.c b/stm/timer.c index 2605d4b4bc..062f8c689e 100644 --- a/stm/timer.c +++ b/stm/timer.c @@ -72,10 +72,10 @@ void timer_init(void) { // Python interface mp_obj_t m = mp_obj_new_module(qstr_from_str_static("timer")); - rt_store_attr(m, qstr_from_str_static("callback"), rt_make_function_1(timer_py_set_callback)); - rt_store_attr(m, qstr_from_str_static("period"), rt_make_function_1(timer_py_set_period)); - rt_store_attr(m, qstr_from_str_static("prescaler"), rt_make_function_1(timer_py_set_prescaler)); - rt_store_attr(m, qstr_from_str_static("value"), rt_make_function_0(timer_py_get_value)); + rt_store_attr(m, qstr_from_str_static("callback"), rt_make_function_n(1, timer_py_set_callback)); + rt_store_attr(m, qstr_from_str_static("period"), rt_make_function_n(1, timer_py_set_period)); + rt_store_attr(m, qstr_from_str_static("prescaler"), rt_make_function_n(1, timer_py_set_prescaler)); + rt_store_attr(m, qstr_from_str_static("value"), rt_make_function_n(0, timer_py_get_value)); rt_store_name(qstr_from_str_static("timer"), m); } @@ -89,7 +89,7 @@ void timer_interrupt(void) { } else { // uncaught exception printf("exception in timer interrupt\n"); - mp_obj_print((mp_obj_t)nlr.ret_val); + mp_obj_print((mp_obj_t)nlr.ret_val, PRINT_REPR); printf("\n"); } } |