diff options
author | Damien George <damien.p.george@gmail.com> | 2017-05-06 17:03:40 +1000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2017-05-06 17:03:40 +1000 |
commit | 0986675451edbdcbe31d90ddacf8f6dc3327a4ae (patch) | |
tree | 57891d7ca68991b27c327ae6d13bfc8df4702fc2 /stmhal/make-stmconst.py | |
parent | 084824f866af4cda42a41a16d844fa47ba3b8938 (diff) | |
download | micropython-0986675451edbdcbe31d90ddacf8f6dc3327a4ae.tar.gz micropython-0986675451edbdcbe31d90ddacf8f6dc3327a4ae.zip |
stmhal: Convert all module and method tables to use MP_ROM macros.
Diffstat (limited to 'stmhal/make-stmconst.py')
-rw-r--r-- | stmhal/make-stmconst.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/stmhal/make-stmconst.py b/stmhal/make-stmconst.py index c9eb42a403..9bb7a05698 100644 --- a/stmhal/make-stmconst.py +++ b/stmhal/make-stmconst.py @@ -162,13 +162,13 @@ def print_regs_as_submodules(reg_name, reg_defs, modules, needed_qstrs): modules.append((mod_name_lower, mod_name_upper)) print(""" -STATIC const mp_map_elem_t stm_%s_globals_table[] = { - { MP_OBJ_NEW_QSTR(MP_QSTR___name__), MP_OBJ_NEW_QSTR(MP_QSTR_%s) }, +STATIC const mp_rom_map_elem_t stm_%s_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_%s) }, """ % (mod_name_lower, mod_name_upper)) needed_qstrs.add(mod_name_upper) for r in reg_defs: - print(' { MP_OBJ_NEW_QSTR(MP_QSTR_%s), MP_OBJ_NEW_SMALL_INT(%#x) }, // %s-bits, %s' % (r[0], r[1], r[2], r[3])) + print(' { MP_ROM_QSTR(MP_QSTR_%s), MP_ROM_INT(%#x) }, // %s-bits, %s' % (r[0], r[1], r[2], r[3])) needed_qstrs.add(r[0]) print("""}; |