summaryrefslogtreecommitdiff
path: root/ports/esp32/machine_touchpad.c
diff options
context:
space:
mode:
Diffstat (limited to 'ports/esp32/machine_touchpad.c')
-rw-r--r--ports/esp32/machine_touchpad.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/ports/esp32/machine_touchpad.c b/ports/esp32/machine_touchpad.c
index 168ac16d0..c5e3483b7 100644
--- a/ports/esp32/machine_touchpad.c
+++ b/ports/esp32/machine_touchpad.c
@@ -134,11 +134,12 @@ STATIC const mp_rom_map_elem_t mtp_locals_dict_table[] = {
STATIC MP_DEFINE_CONST_DICT(mtp_locals_dict, mtp_locals_dict_table);
-const mp_obj_type_t machine_touchpad_type = {
- { &mp_type_type },
- .name = MP_QSTR_TouchPad,
- .make_new = mtp_make_new,
- .locals_dict = (mp_obj_t)&mtp_locals_dict,
-};
+MP_DEFINE_CONST_OBJ_TYPE(
+ machine_touchpad_type,
+ MP_QSTR_TouchPad,
+ MP_TYPE_FLAG_NONE,
+ mtp_make_new,
+ locals_dict, (mp_obj_t)&mtp_locals_dict
+ );
#endif // CONFIG_IDF_TARGET_ESP32