summaryrefslogtreecommitdiff
path: root/ports/esp32/machine_rtc.c
diff options
context:
space:
mode:
Diffstat (limited to 'ports/esp32/machine_rtc.c')
-rw-r--r--ports/esp32/machine_rtc.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/ports/esp32/machine_rtc.c b/ports/esp32/machine_rtc.c
index 72d7b5c82..6634bf5b0 100644
--- a/ports/esp32/machine_rtc.c
+++ b/ports/esp32/machine_rtc.c
@@ -173,9 +173,10 @@ STATIC const mp_rom_map_elem_t machine_rtc_locals_dict_table[] = {
};
STATIC MP_DEFINE_CONST_DICT(machine_rtc_locals_dict, machine_rtc_locals_dict_table);
-const mp_obj_type_t machine_rtc_type = {
- { &mp_type_type },
- .name = MP_QSTR_RTC,
- .make_new = machine_rtc_make_new,
- .locals_dict = (mp_obj_t)&machine_rtc_locals_dict,
-};
+MP_DEFINE_CONST_OBJ_TYPE(
+ machine_rtc_type,
+ MP_QSTR_RTC,
+ MP_TYPE_FLAG_NONE,
+ machine_rtc_make_new,
+ locals_dict, (mp_obj_t)&machine_rtc_locals_dict
+ );