summaryrefslogtreecommitdiffstatshomepage
path: root/stm/timer.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-01-03 00:10:22 +0000
committerDamien George <damien.p.george@gmail.com>2014-01-03 00:10:22 +0000
commitaae7847508e2a9555ad3276c5cd4f42b2e66686c (patch)
tree9a33d436e9eacffdd518c96617651f9f3aef7d8c /stm/timer.c
parent2870862601c7f4957d2710f8e7247de002cf67c4 (diff)
downloadmicropython-aae7847508e2a9555ad3276c5cd4f42b2e66686c.tar.gz
micropython-aae7847508e2a9555ad3276c5cd4f42b2e66686c.zip
Change old use of module creation to new proper use.
Diffstat (limited to 'stm/timer.c')
-rw-r--r--stm/timer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/stm/timer.c b/stm/timer.c
index 2236bbce47..28148b0c1b 100644
--- a/stm/timer.c
+++ b/stm/timer.c
@@ -72,7 +72,7 @@ void timer_init(void) {
TIM_Cmd(TIM6, ENABLE);
// Python interface
- mp_obj_t m = mp_module_new();
+ 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));