convert to MP_DEFINED_CONST_OBJ_TYPE()

This commit is contained in:
Dan Halbert 2023-09-19 21:09:29 -04:00
parent 2c0fa0f7dc
commit 4d175ab41a
156 changed files with 1165 additions and 1183 deletions

View File

@ -128,12 +128,13 @@ STATIC const mp_rom_map_elem_t samd_clock_locals_dict_table[] = {
STATIC MP_DEFINE_CONST_DICT(samd_clock_locals_dict, samd_clock_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(samd_clock_locals_dict, samd_clock_locals_dict_table);
const mp_obj_type_t samd_clock_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, samd_clock_type,
.name = MP_QSTR_Clock, MP_QSTR_Clock,
.print = samd_clock_print, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_t)&samd_clock_locals_dict, print, samd_clock_print,
}; locals_dict, &samd_clock_locals_dict
);
#ifdef SAMD21 #ifdef SAMD21

View File

@ -169,14 +169,12 @@ STATIC const framebuffer_p_t videocore_framebuffer_proto = {
.deinit = videocore_framebuffer_deinit_proto, .deinit = videocore_framebuffer_deinit_proto,
}; };
const mp_obj_type_t videocore_framebuffer_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, videocore_framebuffer_type,
.flags = MP_TYPE_FLAG_EXTENDED, MP_QSTR_Framebuffer,
.name = MP_QSTR_Framebuffer, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_dict_t *)&videocore_framebuffer_locals_dict, locals_dict, (mp_obj_dict_t *)&videocore_framebuffer_locals_dict,
.make_new = videocore_framebuffer_make_new, make_new, videocore_framebuffer_make_new,
MP_TYPE_EXTENDED_FIELDS( buffer, common_hal_videocore_framebuffer_get_buffer,
.buffer_p = { .get_buffer = common_hal_videocore_framebuffer_get_buffer, }, protocol, &videocore_framebuffer_proto
.protocol = &videocore_framebuffer_proto, );
),
};

View File

@ -992,9 +992,10 @@ STATIC const mp_rom_map_elem_t espcamera_camera_locals_table[] = {
STATIC MP_DEFINE_CONST_DICT(espcamera_camera_locals_dict, espcamera_camera_locals_table); STATIC MP_DEFINE_CONST_DICT(espcamera_camera_locals_dict, espcamera_camera_locals_table);
const mp_obj_type_t espcamera_camera_type = { MP_DEFINE_CONST_OBJ_TYPE(
.base = { &mp_type_type }, espcamera_camera_type,
.name = MP_QSTR_Camera, MP_QSTR_Camera,
.make_new = espcamera_camera_make_new, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_t)&espcamera_camera_locals_dict, make_new, espcamera_camera_make_new,
}; locals_dict, &espcamera_camera_locals_dict
);

View File

@ -104,14 +104,15 @@ STATIC void espidf_exception_print(const mp_print_t *print, mp_obj_t o_in, mp_pr
//| //|
//| ... //| ...
//| //|
const mp_obj_type_t mp_type_espidf_IDFError = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, mp_type_espidf_IDFError,
.name = MP_QSTR_IDFError, MP_QSTR_IDFError,
.print = espidf_exception_print, MP_TYPE_FLAG_NONE,
.make_new = mp_obj_exception_make_new, print, espidf_exception_print,
.attr = mp_obj_exception_attr, make_new, mp_obj_exception_make_new,
.parent = &mp_type_OSError, attr, mp_obj_exception_attr,
}; parent, &mp_type_OSError
);
//| class MemoryError(builtins.MemoryError): //| class MemoryError(builtins.MemoryError):
//| """Raised when an ``ESP-IDF`` memory allocation fails.""" //| """Raised when an ``ESP-IDF`` memory allocation fails."""
@ -122,13 +123,14 @@ NORETURN void mp_raise_espidf_MemoryError(void) {
nlr_raise(mp_obj_new_exception(&mp_type_espidf_MemoryError)); nlr_raise(mp_obj_new_exception(&mp_type_espidf_MemoryError));
} }
const mp_obj_type_t mp_type_espidf_MemoryError = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, mp_type_espidf_MemoryError,
.name = MP_QSTR_MemoryError, MP_QSTR_MemoryError,
.print = espidf_exception_print, MP_TYPE_FLAG_NONE,
.make_new = mp_obj_exception_make_new, print, espidf_exception_print,
.attr = mp_obj_exception_attr, make_new, mp_obj_exception_make_new,
.parent = &mp_type_MemoryError, attr, mp_obj_exception_attr,
parent, &mp_type_MemoryError
}; };
//| def get_total_psram() -> int: //| def get_total_psram() -> int:

View File

@ -359,14 +359,12 @@ STATIC mp_obj_t espnow_unary_op(mp_unary_op_t op, mp_obj_t self_in) {
} }
} }
const mp_obj_type_t espnow_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, espnow_type,
.name = MP_QSTR_ESPNow, MP_QSTR_ESPNow,
.make_new = espnow_make_new, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_t)&espnow_locals_dict, make_new, espnow_make_new,
.flags = MP_TYPE_FLAG_EXTENDED, locals_dict, &espnow_locals_dict,
MP_TYPE_EXTENDED_FIELDS( protocol, &espnow_stream_p,
.protocol = &espnow_stream_p, unary_op, &espnow_unary_op
.unary_op = &espnow_unary_op );
),
};

View File

@ -220,9 +220,10 @@ STATIC const mp_rom_map_elem_t espnow_peer_locals_dict_table[] = {
}; };
STATIC MP_DEFINE_CONST_DICT(espnow_peer_locals_dict, espnow_peer_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(espnow_peer_locals_dict, espnow_peer_locals_dict_table);
const mp_obj_type_t espnow_peer_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, espnow_peer_type,
.name = MP_QSTR_Peer, MP_QSTR_Peer,
.make_new = espnow_peer_make_new, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_t)&espnow_peer_locals_dict, make_new, espnow_peer_make_new,
}; locals_dict, &espnow_peer_locals_dict
);

View File

@ -123,15 +123,13 @@ espnow_peers_obj_t *espnow_peers_new(void) {
return self; return self;
} }
const mp_obj_type_t espnow_peers_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, espnow_peers_type,
.name = MP_QSTR_Peers, MP_QSTR_Peers,
.print = espnow_peers_print, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_t)&espnow_peers_locals_dict, print, espnow_peers_print,
.flags = MP_TYPE_FLAG_EXTENDED, locals_dict, &espnow_peers_locals_dict,
MP_TYPE_EXTENDED_FIELDS( unary_op, espnow_peers_unary_op,
.unary_op = espnow_peers_unary_op, subscr, espnow_peers_subscr,
.subscr = espnow_peers_subscr, getiter, espnow_peers_getiter
.getiter = espnow_peers_getiter, );
),
};

View File

@ -172,9 +172,10 @@ STATIC const mp_rom_map_elem_t espulp_ulp_locals_table[] = {
}; };
STATIC MP_DEFINE_CONST_DICT(espulp_ulp_locals_dict, espulp_ulp_locals_table); STATIC MP_DEFINE_CONST_DICT(espulp_ulp_locals_dict, espulp_ulp_locals_table);
const mp_obj_type_t espulp_ulp_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, espulp_ulp_type,
.name = MP_QSTR_ULP, MP_QSTR_ULP,
.make_new = espulp_ulp_make_new, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_t)&espulp_ulp_locals_dict, make_new, espulp_ulp_make_new,
}; locals_dict, &espulp_ulp_locals_dict
);

View File

@ -59,8 +59,9 @@ STATIC mp_obj_t espulp_ulpalarm_make_new(const mp_obj_type_t *type, size_t n_arg
return MP_OBJ_FROM_PTR(self); return MP_OBJ_FROM_PTR(self);
} }
const mp_obj_type_t espulp_ulpalarm_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, espulp_ulpalarm_type,
.name = MP_QSTR_ULPAlarm, MP_QSTR_ULPAlarm,
.make_new = espulp_ulpalarm_make_new, MP_TYPE_FLAG_NONE,
}; make_new, espulp_ulpalarm_make_new
);

View File

@ -52,15 +52,14 @@ void bindings_cyw43_wifi_enforce_pm() {
//| in :py:mod:`board`. A `CywPin` can be used as a DigitalInOut, but not with other //| in :py:mod:`board`. A `CywPin` can be used as a DigitalInOut, but not with other
//| peripherals such as `PWMOut`.""" //| peripherals such as `PWMOut`."""
//| //|
const mp_obj_type_t cyw43_pin_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, cyw43_pin_type,
.flags = MP_TYPE_FLAG_EXTENDED, MP_TYPE_FLAG_EXTENDED,
.name = MP_QSTR_CywPin, MP_TYPE_FLAG_NONE,
.print = shared_bindings_microcontroller_pin_print, name, MP_QSTR_CywPin,
MP_TYPE_EXTENDED_FIELDS( print, shared_bindings_microcontroller_pin_print,
.unary_op = mp_generic_unary_op, unary_op, mp_generic_unary_op,
) );
};
//| PM_STANDARD: int //| PM_STANDARD: int
//| """The standard power management mode""" //| """The standard power management mode"""

View File

@ -248,14 +248,12 @@ STATIC const framebuffer_p_t picodvi_framebuffer_proto = {
.deinit = picodvi_framebuffer_deinit_proto, .deinit = picodvi_framebuffer_deinit_proto,
}; };
const mp_obj_type_t picodvi_framebuffer_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, picodvi_framebuffer_type,
.flags = MP_TYPE_FLAG_EXTENDED, MP_QSTR_Framebuffer,
.name = MP_QSTR_Framebuffer, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_dict_t *)&picodvi_framebuffer_locals_dict, locals_dict, &picodvi_framebuffer_locals_dict,
.make_new = picodvi_framebuffer_make_new, make_new, picodvi_framebuffer_make_new,
MP_TYPE_EXTENDED_FIELDS( buffer, common_hal_picodvi_framebuffer_get_buffer,
.buffer_p = { .get_buffer = common_hal_picodvi_framebuffer_get_buffer, }, protocol, &picodvi_framebuffer_proto,
.protocol = &picodvi_framebuffer_proto, );
),
};

View File

@ -859,9 +859,10 @@ STATIC const mp_rom_map_elem_t rp2pio_statemachine_locals_dict_table[] = {
}; };
STATIC MP_DEFINE_CONST_DICT(rp2pio_statemachine_locals_dict, rp2pio_statemachine_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(rp2pio_statemachine_locals_dict, rp2pio_statemachine_locals_dict_table);
const mp_obj_type_t rp2pio_statemachine_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, rp2pio_statemachine_type,
.name = MP_QSTR_StateMachine, MP_QSTR_StateMachine,
.make_new = rp2pio_statemachine_make_new, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_dict_t *)&rp2pio_statemachine_locals_dict, make_new, rp2pio_statemachine_make_new,
}; locals_dict, &rp2pio_statemachine_locals_dict
);

View File

@ -74,11 +74,12 @@ STATIC const mp_rom_map_elem_t board_module_carrier_table[] = {
MP_DEFINE_CONST_DICT(board_module_carrier, board_module_carrier_table); MP_DEFINE_CONST_DICT(board_module_carrier, board_module_carrier_table);
const mp_obj_type_t carrier_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, carrier_type,
.name = MP_QSTR_Ext, MP_QSTR_Ext,
.locals_dict = (mp_obj_dict_t *)&board_module_carrier, MP_TYPE_FLAG_NONE,
}; locals_dict, &board_module_carrier
);
// Core Feather Pins // Core Feather Pins

View File

@ -1226,7 +1226,6 @@ qstr mp_obj_fun_get_name(mp_const_obj_t fun);
mp_obj_t mp_identity(mp_obj_t self); mp_obj_t mp_identity(mp_obj_t self);
MP_DECLARE_CONST_FUN_OBJ_1(mp_identity_obj); MP_DECLARE_CONST_FUN_OBJ_1(mp_identity_obj);
mp_obj_t mp_identity_getiter(mp_obj_t self, mp_obj_iter_buf_t *iter_buf);
// Generic iterator that uses unary op and subscr to iterate over a native type. It will be slower // Generic iterator that uses unary op and subscr to iterate over a native type. It will be slower
// than a custom iterator but applies broadly. // than a custom iterator but applies broadly.

View File

@ -35,8 +35,9 @@ STATIC void mp_obj_traceback_print(const mp_print_t *print, mp_obj_t o_in, mp_pr
mp_printf(print, "<%q object at %p>", MP_QSTR_traceback, o); mp_printf(print, "<%q object at %p>", MP_QSTR_traceback, o);
} }
const mp_obj_type_t mp_type_traceback = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, mp_type_traceback,
.name = MP_QSTR_traceback, MP_QSTR_traceback,
.print = mp_obj_traceback_print, MP_TYPE_FLAG_NONE,
}; print, mp_obj_traceback_print
);

View File

@ -468,9 +468,10 @@ STATIC const mp_rom_map_elem_t bleio_adapter_locals_dict_table[] = {
STATIC MP_DEFINE_CONST_DICT(bleio_adapter_locals_dict, bleio_adapter_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(bleio_adapter_locals_dict, bleio_adapter_locals_dict_table);
const mp_obj_type_t bleio_adapter_type = { MP_DEFINE_CONST_OBJ_TYPE(
.base = { &mp_type_type }, bleio_adapter_type,
.name = MP_QSTR_Adapter, MP_QSTR_Adapter,
.make_new = bleio_adapter_make_new, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_t)&bleio_adapter_locals_dict, make_new, bleio_adapter_make_new,
}; locals_dict, &bleio_adapter_locals_dict
);

View File

@ -199,15 +199,13 @@ STATIC const mp_rom_map_elem_t bleio_address_locals_dict_table[] = {
STATIC MP_DEFINE_CONST_DICT(bleio_address_locals_dict, bleio_address_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(bleio_address_locals_dict, bleio_address_locals_dict_table);
const mp_obj_type_t bleio_address_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, bleio_address_type,
.flags = MP_TYPE_FLAG_EXTENDED, MP_QSTR_Address,
.name = MP_QSTR_Address, MP_TYPE_FLAG_NONE,
.make_new = bleio_address_make_new, make_new, bleio_address_make_new,
.print = bleio_address_print, print, bleio_address_print,
.locals_dict = (mp_obj_dict_t *)&bleio_address_locals_dict, locals_dict, &bleio_address_locals_dict,
MP_TYPE_EXTENDED_FIELDS( unary_op, bleio_address_unary_op,
.unary_op = bleio_address_unary_op, binary_op, bleio_address_binary_op
.binary_op = bleio_address_binary_op, );
),
};

View File

@ -74,8 +74,9 @@ STATIC const mp_rom_map_elem_t bleio_attribute_locals_dict_table[] = {
}; };
STATIC MP_DEFINE_CONST_DICT(bleio_attribute_locals_dict, bleio_attribute_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(bleio_attribute_locals_dict, bleio_attribute_locals_dict_table);
const mp_obj_type_t bleio_attribute_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, bleio_attribute_type,
.name = MP_QSTR_Attribute, MP_QSTR_Attribute,
.locals_dict = (mp_obj_dict_t *)&bleio_attribute_locals_dict, MP_TYPE_FLAG_NONE,
}; locals_dict, &bleio_attribute_locals_dict
);

View File

@ -325,9 +325,10 @@ STATIC void bleio_characteristic_print(const mp_print_t *print, mp_obj_t self_in
} }
} }
const mp_obj_type_t bleio_characteristic_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, bleio_characteristic_type,
.name = MP_QSTR_Characteristic, MP_QSTR_Characteristic,
.print = bleio_characteristic_print, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_dict_t *)&bleio_characteristic_locals_dict, print, bleio_characteristic_print,
}; locals_dict, &bleio_characteristic_locals_dict
);

View File

@ -222,15 +222,12 @@ STATIC const mp_stream_p_t characteristic_buffer_stream_p = {
}; };
const mp_obj_type_t bleio_characteristic_buffer_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, bleio_characteristic_buffer_type,
.flags = MP_TYPE_FLAG_EXTENDED, MP_QSTR_CharacteristicBuffer,
.name = MP_QSTR_CharacteristicBuffer, MP_TYPE_FLAG_ITER_IS_ITERNEXT,
.make_new = bleio_characteristic_buffer_make_new, make_new, bleio_characteristic_buffer_make_new,
.locals_dict = (mp_obj_dict_t *)&bleio_characteristic_buffer_locals_dict, locals_dict, &bleio_characteristic_buffer_locals_dict,
MP_TYPE_EXTENDED_FIELDS( iternext, mp_stream_unbuffered_iter,
.getiter = mp_identity_getiter, protocol, &characteristic_buffer_stream_p
.iternext = mp_stream_unbuffered_iter, );
.protocol = &characteristic_buffer_stream_p,
),
};

View File

@ -244,12 +244,10 @@ STATIC const mp_rom_map_elem_t bleio_connection_locals_dict_table[] = {
STATIC MP_DEFINE_CONST_DICT(bleio_connection_locals_dict, bleio_connection_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(bleio_connection_locals_dict, bleio_connection_locals_dict_table);
const mp_obj_type_t bleio_connection_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, bleio_connection_type,
.flags = MP_TYPE_FLAG_EXTENDED, MP_QSTR_Connection,
.name = MP_QSTR_Connection, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_dict_t *)&bleio_connection_locals_dict, locals_dict, &bleio_connection_locals_dict,
MP_TYPE_EXTENDED_FIELDS( unary_op, mp_generic_unary_op
.unary_op = mp_generic_unary_op, );
),
};

View File

@ -211,9 +211,10 @@ STATIC void bleio_descriptor_print(const mp_print_t *print, mp_obj_t self_in, mp
} }
} }
const mp_obj_type_t bleio_descriptor_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, bleio_descriptor_type,
.name = MP_QSTR_Descriptor, MP_QSTR_Descriptor,
.print = bleio_descriptor_print, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_dict_t *)&bleio_descriptor_locals_dict print, bleio_descriptor_print,
}; locals_dict, &bleio_descriptor_locals_dict
);

View File

@ -229,9 +229,10 @@ STATIC const mp_rom_map_elem_t bleio_packet_buffer_locals_dict_table[] = {
STATIC MP_DEFINE_CONST_DICT(bleio_packet_buffer_locals_dict, bleio_packet_buffer_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(bleio_packet_buffer_locals_dict, bleio_packet_buffer_locals_dict_table);
const mp_obj_type_t bleio_packet_buffer_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, bleio_packet_buffer_type,
.name = MP_QSTR_PacketBuffer, MP_QSTR_PacketBuffer,
.make_new = bleio_packet_buffer_make_new, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_dict_t *)&bleio_packet_buffer_locals_dict make_new, bleio_packet_buffer_make_new,
}; locals_dict, &bleio_packet_buffer_locals_dict
);

View File

@ -136,8 +136,9 @@ STATIC const mp_rom_map_elem_t bleio_scanentry_locals_dict_table[] = {
STATIC MP_DEFINE_CONST_DICT(bleio_scanentry_locals_dict, bleio_scanentry_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(bleio_scanentry_locals_dict, bleio_scanentry_locals_dict_table);
const mp_obj_type_t bleio_scanentry_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, bleio_scanentry_type,
.name = MP_QSTR_ScanEntry, MP_QSTR_ScanEntry,
.locals_dict = (mp_obj_dict_t *)&bleio_scanentry_locals_dict MP_TYPE_FLAG_NONE,
}; locals_dict, &bleio_scanentry_locals_dict
);

View File

@ -59,12 +59,10 @@ STATIC mp_obj_t scanresults_iternext(mp_obj_t self_in) {
//| ... //| ...
//| //|
const mp_obj_type_t bleio_scanresults_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, bleio_scanresults_type,
.flags = MP_TYPE_FLAG_EXTENDED, MP_QSTR_ScanResults,
.name = MP_QSTR_ScanResults, MP_TYPE_FLAG_ITER_IS_ITERNEXT,
MP_TYPE_EXTENDED_FIELDS( getiter, mp_identity_getiter,
.getiter = mp_identity_getiter, iternext, scanresults_iternext
.iternext = scanresults_iternext, );
),
};

View File

@ -3,13 +3,9 @@
* *
* The MIT License (MIT) * The MIT License (MIT)
* *
<<<<<<<< HEAD:shared-bindings/_bleio/ScanResults.h
* Copyright (c) 2019 Dan Halbert for Adafruit Industries * Copyright (c) 2019 Dan Halbert for Adafruit Industries
* Copyright (c) 2018 Artur Pacholec * Copyright (c) 2018 Artur Pacholec
* Copyright (c) 2017 Glenn Ruben Bakke * Copyright (c) 2017 Glenn Ruben Bakke
========
* Copyright (c) 2022 Blake W. Felt & Angus Gratton
>>>>>>>> v1.20.0:shared/tinyusb/mp_usbd.h
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
@ -30,7 +26,6 @@
* THE SOFTWARE. * THE SOFTWARE.
*/ */
<<<<<<<< HEAD:shared-bindings/_bleio/ScanResults.h
#ifndef MICROPY_INCLUDED_SHARED_BINDINGS_BLEIO_SCANRESULTS_H #ifndef MICROPY_INCLUDED_SHARED_BINDINGS_BLEIO_SCANRESULTS_H
#define MICROPY_INCLUDED_SHARED_BINDINGS_BLEIO_SCANRESULTS_H #define MICROPY_INCLUDED_SHARED_BINDINGS_BLEIO_SCANRESULTS_H
@ -42,18 +37,3 @@ extern const mp_obj_type_t bleio_scanresults_type;
mp_obj_t common_hal_bleio_scanresults_next(bleio_scanresults_obj_t *self); mp_obj_t common_hal_bleio_scanresults_next(bleio_scanresults_obj_t *self);
#endif // MICROPY_INCLUDED_SHARED_BINDINGS_BLEIO_SCANRESULTS_H #endif // MICROPY_INCLUDED_SHARED_BINDINGS_BLEIO_SCANRESULTS_H
========
#ifndef MICROPY_INCLUDED_SHARED_TINYUSB_MP_USBD_H
#define MICROPY_INCLUDED_SHARED_TINYUSB_MP_USBD_H
#include "py/obj.h"
// Call instead of tud_task()
void mp_usbd_task(void);
// Function to be implemented in port code.
// Can write a string up to MICROPY_HW_USB_DESC_STR_MAX characters long, plus terminating byte.
extern void mp_usbd_port_get_serial_number(char *buf);
#endif // MICROPY_INCLUDED_SHARED_TINYUSB_USBD_H
>>>>>>>> v1.20.0:shared/tinyusb/mp_usbd.h

View File

@ -140,10 +140,11 @@ STATIC void bleio_service_print(const mp_print_t *print, mp_obj_t self_in, mp_pr
} }
} }
const mp_obj_type_t bleio_service_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, bleio_service_type,
.name = MP_QSTR_Service, MP_QSTR_Service,
.make_new = bleio_service_make_new, MP_TYPE_FLAG_NONE,
.print = bleio_service_print, make_new, bleio_service_make_new,
.locals_dict = (mp_obj_dict_t *)&bleio_service_locals_dict print, bleio_service_print,
}; locals_dict, &bleio_service_locals_dict
);

View File

@ -280,15 +280,13 @@ void bleio_uuid_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t
} }
} }
const mp_obj_type_t bleio_uuid_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, bleio_uuid_type,
.flags = MP_TYPE_FLAG_EXTENDED, MP_QSTR_UUID,
.name = MP_QSTR_UUID, MP_TYPE_FLAG_NONE,
.print = bleio_uuid_print, print, bleio_uuid_print,
.make_new = bleio_uuid_make_new, make_new, bleio_uuid_make_new,
.locals_dict = (mp_obj_dict_t *)&bleio_uuid_locals_dict, locals_dict, &bleio_uuid_locals_dict,
MP_TYPE_EXTENDED_FIELDS( unary_op, bleio_uuid_unary_op,
.unary_op = bleio_uuid_unary_op, binary_op, bleio_uuid_binary_op,
.binary_op = bleio_uuid_binary_op, );
),
};

View File

@ -1064,12 +1064,13 @@ STATIC mp_obj_t _EVE_make_new(const mp_obj_type_t *type, size_t n_args, size_t n
return MP_OBJ_FROM_PTR(o); return MP_OBJ_FROM_PTR(o);
} }
STATIC const mp_obj_type_t _EVE_type = { STATIC MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, _EVE_type,
.name = MP_QSTR__EVE, MP_QSTR__EVE,
.make_new = _EVE_make_new, MP_TYPE_FLAG_NONE,
.locals_dict = (void *)&_EVE_locals_dict, make_new, _EVE_make_new,
}; locals_dict, &_EVE_locals_dict
);
STATIC const mp_rom_map_elem_t mp_module__eve_globals_table[] = { STATIC const mp_rom_map_elem_t mp_module__eve_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR__eve) }, { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR__eve) },

View File

@ -129,9 +129,11 @@ STATIC mp_obj_t pewpew_make_new(const mp_obj_type_t *type, size_t n_args, size_t
STATIC const mp_rom_map_elem_t pewpew_locals_dict_table[] = { STATIC const mp_rom_map_elem_t pewpew_locals_dict_table[] = {
}; };
STATIC MP_DEFINE_CONST_DICT(pewpew_locals_dict, pewpew_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(pewpew_locals_dict, pewpew_locals_dict_table);
const mp_obj_type_t pewpew_type = {
{ &mp_type_type }, MP_DEFINE_CONST_OBJ_TYPE(
.name = MP_QSTR_PewPew, pewpew_type,
.make_new = pewpew_make_new, MP_QSTR_PewPew,
.locals_dict = (mp_obj_dict_t *)&pewpew_locals_dict, MP_TYPE_FLAG_NONE,
}; make_new, pewpew_make_new,
locals_dict, &pewpew_locals_dict
);

View File

@ -255,14 +255,12 @@ STATIC const mp_rom_map_elem_t pixelmap_pixelmap_locals_dict_table[] = {
STATIC MP_DEFINE_CONST_DICT(pixelmap_pixelmap_locals_dict, pixelmap_pixelmap_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(pixelmap_pixelmap_locals_dict, pixelmap_pixelmap_locals_dict_table);
const mp_obj_type_t pixelmap_pixelmap_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, pixelmap_pixelmap_type,
.name = MP_QSTR_PixelMap, MP_QSTR_PixelMap,
.flags = MP_TYPE_FLAG_EXTENDED, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_t)&pixelmap_pixelmap_locals_dict, .locals_dict, &pixelmap_pixelmap_locals_dict,
.make_new = pixelmap_pixelmap_make_new, .make_new, pixelmap_pixelmap_make_new,
MP_TYPE_EXTENDED_FIELDS( .subscr, pixelmap_pixelmap_subscr,
.subscr = pixelmap_pixelmap_subscr, .unary_op, pixelmap_pixelmap_unary_op
.unary_op = pixelmap_pixelmap_unary_op, );
),
};

View File

@ -124,9 +124,10 @@ STATIC const mp_rom_map_elem_t layer_locals_dict_table[] = {
}; };
STATIC MP_DEFINE_CONST_DICT(layer_locals_dict, layer_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(layer_locals_dict, layer_locals_dict_table);
const mp_obj_type_t mp_type_layer = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, mp_type_layer,
.name = MP_QSTR_Layer, MP_QSTR_Layer,
.make_new = layer_make_new, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_dict_t *)&layer_locals_dict, make_new, layer_make_new,
}; locals_dict, &layer_locals_dict
);

View File

@ -104,9 +104,10 @@ STATIC const mp_rom_map_elem_t text_locals_dict_table[] = {
}; };
STATIC MP_DEFINE_CONST_DICT(text_locals_dict, text_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(text_locals_dict, text_locals_dict_table);
const mp_obj_type_t mp_type_text = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, mp_type_text,
.name = MP_QSTR_Text, MP_QSTR_Text,
.make_new = text_make_new, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_dict_t *)&text_locals_dict, make_new, text_make_new,
}; locals_dict,&text_locals_dict
);

View File

@ -284,9 +284,10 @@ STATIC const mp_rom_map_elem_t adafruit_bus_device_i2cdevice_locals_dict_table[]
STATIC MP_DEFINE_CONST_DICT(adafruit_bus_device_i2cdevice_locals_dict, adafruit_bus_device_i2cdevice_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(adafruit_bus_device_i2cdevice_locals_dict, adafruit_bus_device_i2cdevice_locals_dict_table);
const mp_obj_type_t adafruit_bus_device_i2cdevice_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, adafruit_bus_device_i2cdevice_type,
.name = MP_QSTR_I2CDevice, MP_QSTR_I2CDevice,
.make_new = adafruit_bus_device_i2cdevice_make_new, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_dict_t *)&adafruit_bus_device_i2cdevice_locals_dict, make_new, adafruit_bus_device_i2cdevice_make_new,
}; locals_dict = &adafruit_bus_device_i2cdevice_locals_dict
);

View File

@ -142,9 +142,10 @@ STATIC const mp_rom_map_elem_t adafruit_bus_device_spidevice_locals_dict_table[]
STATIC MP_DEFINE_CONST_DICT(adafruit_bus_device_spidevice_locals_dict, adafruit_bus_device_spidevice_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(adafruit_bus_device_spidevice_locals_dict, adafruit_bus_device_spidevice_locals_dict_table);
const mp_obj_type_t adafruit_bus_device_spidevice_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, adafruit_bus_device_spidevice_type,
.name = MP_QSTR_SPIDevice, MP_QSTR_SPIDevice,
.make_new = adafruit_bus_device_spidevice_make_new, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_dict_t *)&adafruit_bus_device_spidevice_locals_dict, make_new, adafruit_bus_device_spidevice_make_new,
}; locals_dict, &adafruit_bus_device_spidevice_locals_dict
);

View File

@ -368,15 +368,13 @@ STATIC const mp_rom_map_elem_t pixelbuf_pixelbuf_locals_dict_table[] = {
STATIC MP_DEFINE_CONST_DICT(pixelbuf_pixelbuf_locals_dict, pixelbuf_pixelbuf_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(pixelbuf_pixelbuf_locals_dict, pixelbuf_pixelbuf_locals_dict_table);
const mp_obj_type_t pixelbuf_pixelbuf_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, pixelbuf_pixelbuf_type,
.name = MP_QSTR_PixelBuf, MP_QSTR_PixelBuf,
.flags = MP_TYPE_FLAG_EXTENDED, MP_TYPE_FLAG_ITER_IS_GETITER,
.locals_dict = (mp_obj_t)&pixelbuf_pixelbuf_locals_dict, locals_dict, &pixelbuf_pixelbuf_locals_dict,
.make_new = pixelbuf_pixelbuf_make_new, make_new, pixelbuf_pixelbuf_make_new,
MP_TYPE_EXTENDED_FIELDS( subscr, pixelbuf_pixelbuf_subscr,
.subscr = pixelbuf_pixelbuf_subscr, unary_op, pixelbuf_pixelbuf_unary_op,
.unary_op = pixelbuf_pixelbuf_unary_op, iter, mp_obj_new_generic_iterator
.getiter = mp_obj_new_generic_iterator, );
),
};

View File

@ -249,9 +249,10 @@ STATIC const mp_rom_map_elem_t aesio_locals_dict_table[] = {
}; };
STATIC MP_DEFINE_CONST_DICT(aesio_locals_dict, aesio_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(aesio_locals_dict, aesio_locals_dict_table);
const mp_obj_type_t aesio_aes_type = { MP_DEFINE_CONST_OBJ_TYPE(
{&mp_type_type}, aesio_aes_type,
.name = MP_QSTR_AES, MP_QSTR_AES,
.make_new = aesio_aes_make_new, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_dict_t *)&aesio_locals_dict, make_new, aesio_aes_make_new,
}; locals_dict, &aesio_locals_dict
);

View File

@ -169,13 +169,11 @@ STATIC mp_obj_t alarm_sleep_memory_subscr(mp_obj_t self_in, mp_obj_t index_in, m
} }
} }
const mp_obj_type_t alarm_sleep_memory_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, alarm_sleep_memory_type,
.name = MP_QSTR_SleepMemory, MP_QSTR_SleepMemory,
.flags = MP_TYPE_FLAG_EXTENDED, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_t)&alarm_sleep_memory_locals_dict, locals_dict, &alarm_sleep_memory_locals_dict,
MP_TYPE_EXTENDED_FIELDS( subscr, alarm_sleep_memory_subscr,
.subscr = alarm_sleep_memory_subscr, unary_op, alarm_sleep_memory_unary_op
.unary_op = alarm_sleep_memory_unary_op, );
),
};

View File

@ -117,9 +117,10 @@ STATIC const mp_rom_map_elem_t alarm_pin_pinalarm_locals_dict_table[] = {
STATIC MP_DEFINE_CONST_DICT(alarm_pin_pinalarm_locals_dict, alarm_pin_pinalarm_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(alarm_pin_pinalarm_locals_dict, alarm_pin_pinalarm_locals_dict_table);
const mp_obj_type_t alarm_pin_pinalarm_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, alarm_pin_pinalarm_type,
.name = MP_QSTR_PinAlarm, MP_QSTR_PinAlarm,
.make_new = alarm_pin_pinalarm_make_new, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_t)&alarm_pin_pinalarm_locals_dict, make_new, alarm_pin_pinalarm_make_new,
}; locals_dict, &alarm_pin_pinalarm_locals_dict
);

View File

@ -131,9 +131,10 @@ STATIC const mp_rom_map_elem_t alarm_time_timealarm_locals_dict_table[] = {
STATIC MP_DEFINE_CONST_DICT(alarm_time_timealarm_locals_dict, alarm_time_timealarm_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(alarm_time_timealarm_locals_dict, alarm_time_timealarm_locals_dict_table);
const mp_obj_type_t alarm_time_timealarm_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, alarm_time_timealarm_type,
.name = MP_QSTR_TimeAlarm, MP_QSTR_TimeAlarm,
.make_new = alarm_time_timealarm_make_new, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_t)&alarm_time_timealarm_locals_dict, make_new, alarm_time_timealarm_make_new,
}; locals_dict, &alarm_time_timealarm_locals_dict
);

View File

@ -79,9 +79,10 @@ STATIC const mp_rom_map_elem_t alarm_touch_touchalarm_locals_dict_table[] = {
}; };
STATIC MP_DEFINE_CONST_DICT(alarm_touch_touchalarm_locals_dict, alarm_touch_touchalarm_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(alarm_touch_touchalarm_locals_dict, alarm_touch_touchalarm_locals_dict_table);
const mp_obj_type_t alarm_touch_touchalarm_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, alarm_touch_touchalarm_type,
.name = MP_QSTR_TouchAlarm, MP_QSTR_TouchAlarm,
.make_new = alarm_touch_touchalarm_make_new, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_t)&alarm_touch_touchalarm_locals_dict, make_new, alarm_touch_touchalarm_make_new,
}; locals_dict, &alarm_touch_touchalarm_locals_dict
);

View File

@ -164,9 +164,10 @@ STATIC const mp_rom_map_elem_t analogbufio_bufferedin_locals_dict_table[] = {
STATIC MP_DEFINE_CONST_DICT(analogbufio_bufferedin_locals_dict, analogbufio_bufferedin_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(analogbufio_bufferedin_locals_dict, analogbufio_bufferedin_locals_dict_table);
const mp_obj_type_t analogbufio_bufferedin_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, analogbufio_bufferedin_type,
.name = MP_QSTR_BufferedIn, MP_QSTR_BufferedIn,
.make_new = analogbufio_bufferedin_make_new, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_t)&analogbufio_bufferedin_locals_dict, make_new, analogbufio_bufferedin_make_new,
}; locals_dict, &analogbufio_bufferedin_locals_dict
);

View File

@ -149,9 +149,10 @@ STATIC const mp_rom_map_elem_t analogio_analogin_locals_dict_table[] = {
STATIC MP_DEFINE_CONST_DICT(analogio_analogin_locals_dict, analogio_analogin_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(analogio_analogin_locals_dict, analogio_analogin_locals_dict_table);
const mp_obj_type_t analogio_analogin_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, analogio_analogin_type,
.name = MP_QSTR_AnalogIn, MP_QSTR_AnalogIn,
.make_new = analogio_analogin_make_new, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_t)&analogio_analogin_locals_dict, make_new, analogio_analogin_make_new,
}; locals_dict, &analogio_analogin_locals_dict
);

View File

@ -130,9 +130,10 @@ STATIC const mp_rom_map_elem_t analogio_analogout_locals_dict_table[] = {
STATIC MP_DEFINE_CONST_DICT(analogio_analogout_locals_dict, analogio_analogout_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(analogio_analogout_locals_dict, analogio_analogout_locals_dict_table);
const mp_obj_type_t analogio_analogout_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, analogio_analogout_type,
.name = MP_QSTR_AnalogOut, MP_QSTR_AnalogOut,
.make_new = analogio_analogout_make_new, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_t)&analogio_analogout_locals_dict, make_new, analogio_analogout_make_new,
}; locals_dict, &analogio_analogout_locals_dict
);

View File

@ -268,9 +268,10 @@ STATIC const mp_rom_map_elem_t audiobusio_i2sout_locals_dict_table[] = {
}; };
STATIC MP_DEFINE_CONST_DICT(audiobusio_i2sout_locals_dict, audiobusio_i2sout_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(audiobusio_i2sout_locals_dict, audiobusio_i2sout_locals_dict_table);
const mp_obj_type_t audiobusio_i2sout_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, audiobusio_i2sout_type,
.name = MP_QSTR_I2SOut, MP_QSTR_I2SOut,
.make_new = audiobusio_i2sout_make_new, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_dict_t *)&audiobusio_i2sout_locals_dict, make_new, audiobusio_i2sout_make_new,
}; locals_dict, &audiobusio_i2sout_locals_dict
);

View File

@ -241,11 +241,12 @@ STATIC const mp_rom_map_elem_t audiobusio_pdmin_locals_dict_table[] = {
STATIC MP_DEFINE_CONST_DICT(audiobusio_pdmin_locals_dict, audiobusio_pdmin_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(audiobusio_pdmin_locals_dict, audiobusio_pdmin_locals_dict_table);
#endif #endif
const mp_obj_type_t audiobusio_pdmin_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, audiobusio_pdmin_type,
.name = MP_QSTR_PDMIn, MP_QSTR_PDMIn,
.make_new = audiobusio_pdmin_make_new, MP_TYPE_FLAG_NONE,
make_new, audiobusio_pdmin_make_new,
#if CIRCUITPY_AUDIOBUSIO_PDMIN #if CIRCUITPY_AUDIOBUSIO_PDMIN
.locals_dict = (mp_obj_dict_t *)&audiobusio_pdmin_locals_dict, locals_dict, &audiobusio_pdmin_locals_dict
#endif #endif
}; );

View File

@ -174,13 +174,11 @@ STATIC const audiosample_p_t audioio_rawsample_proto = {
.get_buffer_structure = (audiosample_get_buffer_structure_fun)audioio_rawsample_get_buffer_structure, .get_buffer_structure = (audiosample_get_buffer_structure_fun)audioio_rawsample_get_buffer_structure,
}; };
const mp_obj_type_t audioio_rawsample_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, audioio_rawsample_type,
.name = MP_QSTR_RawSample, MP_QSTR_RawSample,
.flags = MP_TYPE_FLAG_EXTENDED, MP_TYPE_FLAG_NONE,
.make_new = audioio_rawsample_make_new, make_new, audioio_rawsample_make_new,
.locals_dict = (mp_obj_dict_t *)&audioio_rawsample_locals_dict, locals_dict, &audioio_rawsample_locals_dict,
MP_TYPE_EXTENDED_FIELDS( protocol, &audioio_rawsample_proto
.protocol = &audioio_rawsample_proto, );
),
};

View File

@ -200,13 +200,11 @@ STATIC const audiosample_p_t audioio_wavefile_proto = {
}; };
const mp_obj_type_t audioio_wavefile_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, audioio_wavefile_type,
.name = MP_QSTR_WaveFile, MP_QSTR_WaveFile,
.flags = MP_TYPE_FLAG_EXTENDED, MP_TYPE_FLAG_NONE,
.make_new = audioio_wavefile_make_new, make_new, audioio_wavefile_make_new,
.locals_dict = (mp_obj_dict_t *)&audioio_wavefile_locals_dict, locals_dict, &audioio_wavefile_locals_dict,
MP_TYPE_EXTENDED_FIELDS( protocol, &audioio_wavefile_proto
.protocol = &audioio_wavefile_proto, );
),
};

View File

@ -258,9 +258,10 @@ STATIC const mp_rom_map_elem_t audioio_audioout_locals_dict_table[] = {
}; };
STATIC MP_DEFINE_CONST_DICT(audioio_audioout_locals_dict, audioio_audioout_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(audioio_audioout_locals_dict, audioio_audioout_locals_dict_table);
const mp_obj_type_t audioio_audioout_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, audioio_audioout_type,
.name = MP_QSTR_AudioOut, MP_QSTR_AudioOut,
.make_new = audioio_audioout_make_new, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_dict_t *)&audioio_audioout_locals_dict, make_new, audioio_audioout_make_new,
}; locals_dict, &audioio_audioout_locals_dict
);

View File

@ -272,13 +272,11 @@ STATIC const audiosample_p_t audiomixer_mixer_proto = {
.get_buffer_structure = (audiosample_get_buffer_structure_fun)audiomixer_mixer_get_buffer_structure, .get_buffer_structure = (audiosample_get_buffer_structure_fun)audiomixer_mixer_get_buffer_structure,
}; };
const mp_obj_type_t audiomixer_mixer_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, audiomixer_mixer_type,
.name = MP_QSTR_Mixer, MP_QSTR_Mixer,
.flags = MP_TYPE_FLAG_EXTENDED, MP_TYPE_FLAG_NONE,
.make_new = audiomixer_mixer_make_new, make_new, audiomixer_mixer_make_new,
.locals_dict = (mp_obj_dict_t *)&audiomixer_mixer_locals_dict, locals_dict, &audiomixer_mixer_locals_dict,
MP_TYPE_EXTENDED_FIELDS( protocol, &audiomixer_mixer_proto
.protocol = &audiomixer_mixer_proto, );
),
};

View File

@ -153,9 +153,10 @@ STATIC const mp_rom_map_elem_t audiomixer_mixervoice_locals_dict_table[] = {
}; };
STATIC MP_DEFINE_CONST_DICT(audiomixer_mixervoice_locals_dict, audiomixer_mixervoice_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(audiomixer_mixervoice_locals_dict, audiomixer_mixervoice_locals_dict_table);
const mp_obj_type_t audiomixer_mixervoice_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, audiomixer_mixervoice_type,
.name = MP_QSTR_MixerVoice, MP_QSTR_MixerVoice,
.make_new = audiomixer_mixervoice_make_new, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_dict_t *)&audiomixer_mixervoice_locals_dict, make_new, audiomixer_mixervoice_make_new,
}; locals_dict, &audiomixer_mixervoice_locals_dict
);

View File

@ -283,13 +283,11 @@ STATIC const audiosample_p_t audiomp3_mp3file_proto = {
.get_buffer_structure = (audiosample_get_buffer_structure_fun)audiomp3_mp3file_get_buffer_structure, .get_buffer_structure = (audiosample_get_buffer_structure_fun)audiomp3_mp3file_get_buffer_structure,
}; };
const mp_obj_type_t audiomp3_mp3file_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, audiomp3_mp3file_type,
.name = MP_QSTR_MP3Decoder, MP_QSTR_MP3Decoder,
.flags = MP_TYPE_FLAG_EXTENDED, MP_TYPE_FLAG_NONE,
.make_new = audiomp3_mp3file_make_new, make_new, audiomp3_mp3file_make_new,
.locals_dict = (mp_obj_dict_t *)&audiomp3_mp3file_locals_dict, locals_dict, &audiomp3_mp3file_locals_dict,
MP_TYPE_EXTENDED_FIELDS( .protocol, &audiomp3_mp3file_proto
.protocol = &audiomp3_mp3file_proto, );
),
};

View File

@ -268,9 +268,10 @@ STATIC const mp_rom_map_elem_t audiopwmio_pwmaudioout_locals_dict_table[] = {
}; };
STATIC MP_DEFINE_CONST_DICT(audiopwmio_pwmaudioout_locals_dict, audiopwmio_pwmaudioout_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(audiopwmio_pwmaudioout_locals_dict, audiopwmio_pwmaudioout_locals_dict_table);
const mp_obj_type_t audiopwmio_pwmaudioout_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, audiopwmio_pwmaudioout_type,
.name = MP_QSTR_PWMAudioOut, MP_QSTR_PWMAudioOut,
.make_new = audiopwmio_pwmaudioout_make_new, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_dict_t *)&audiopwmio_pwmaudioout_locals_dict, make_new, audiopwmio_pwmaudioout_make_new,
}; locals_dict, &audiopwmio_pwmaudioout_locals_dict
);

View File

@ -362,9 +362,10 @@ STATIC const mp_rom_map_elem_t bitbangio_i2c_locals_dict_table[] = {
STATIC MP_DEFINE_CONST_DICT(bitbangio_i2c_locals_dict, bitbangio_i2c_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(bitbangio_i2c_locals_dict, bitbangio_i2c_locals_dict_table);
const mp_obj_type_t bitbangio_i2c_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, bitbangio_i2c_type,
.name = MP_QSTR_I2C, MP_QSTR_I2C,
.make_new = bitbangio_i2c_make_new, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_dict_t *)&bitbangio_i2c_locals_dict, make_new,bitbangio_i2c_make_new,
}; locals_dict, &bitbangio_i2c_locals_dict
);

View File

@ -410,9 +410,10 @@ STATIC const mp_rom_map_elem_t bitbangio_spi_locals_dict_table[] = {
}; };
STATIC MP_DEFINE_CONST_DICT(bitbangio_spi_locals_dict, bitbangio_spi_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(bitbangio_spi_locals_dict, bitbangio_spi_locals_dict_table);
const mp_obj_type_t bitbangio_spi_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, bitbangio_spi_type,
.name = MP_QSTR_SPI, MP_QSTR_SPI,
.make_new = bitbangio_spi_make_new, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_dict_t *)&bitbangio_spi_locals_dict, make_new, bitbangio_spi_make_new,
}; locals_dict, &bitbangio_spi_locals_dict
);

View File

@ -388,9 +388,10 @@ STATIC const mp_rom_map_elem_t busio_i2c_locals_dict_table[] = {
STATIC MP_DEFINE_CONST_DICT(busio_i2c_locals_dict, busio_i2c_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(busio_i2c_locals_dict, busio_i2c_locals_dict_table);
const mp_obj_type_t busio_i2c_type = { const MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, busio_i2c_type,
.name = MP_QSTR_I2C, MP_QSTR_I2C,
.make_new = busio_i2c_make_new, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_dict_t *)&busio_i2c_locals_dict, make_new, busio_i2c_make_new,
}; locals_dict, &busio_i2c_locals_dict
);

View File

@ -474,12 +474,13 @@ STATIC const mp_rom_map_elem_t busio_spi_locals_dict_table[] = {
}; };
STATIC MP_DEFINE_CONST_DICT(busio_spi_locals_dict, busio_spi_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(busio_spi_locals_dict, busio_spi_locals_dict_table);
const mp_obj_type_t busio_spi_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, busio_spi_type,
.name = MP_QSTR_SPI, MP_QSTR_SPI,
.make_new = busio_spi_make_new, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_dict_t *)&busio_spi_locals_dict, make_new, busio_spi_make_new,
}; locals_dict, &busio_spi_locals_dict
);
busio_spi_obj_t *validate_obj_is_spi_bus(mp_obj_t obj, qstr arg_name) { busio_spi_obj_t *validate_obj_is_spi_bus(mp_obj_t obj, qstr arg_name) {
return mp_arg_validate_type(obj, &busio_spi_type, arg_name); return mp_arg_validate_type(obj, &busio_spi_type, arg_name);

View File

@ -446,23 +446,20 @@ STATIC const mp_stream_p_t uart_stream_p = {
.pyserial_readinto_compatibility = true, .pyserial_readinto_compatibility = true,
}; };
const mp_obj_type_t busio_uart_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, busio_uart_type,
.flags = MP_TYPE_FLAG_EXTENDED, MP_QSTR_UART,
.name = MP_QSTR_UART, MP_TYPE_FLAG_ITER_IS_ITERNEXT,
.make_new = busio_uart_make_new, make_new, busio_uart_make_new,
.locals_dict = (mp_obj_dict_t *)&busio_uart_locals_dict, locals_dict, &busio_uart_locals_dict,
MP_TYPE_EXTENDED_FIELDS( iter, mp_stream_unbuffered_iter
.getiter = mp_identity_getiter, );
.iternext = mp_stream_unbuffered_iter,
.protocol = &uart_stream_p,
),
};
#else #else
const mp_obj_type_t busio_uart_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, busio_uart_type,
.name = MP_QSTR_UART, MP_QSTR_UART,
.make_new = busio_uart_make_new, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_dict_t *)&busio_uart_locals_dict, make_new, busio_uart_make_new,
}; locals_dict, &busio_uart_locals_dict
);
#endif // CIRCUITPY_BUSIO_UART #endif // CIRCUITPY_BUSIO_UART

View File

@ -121,9 +121,10 @@ STATIC const mp_rom_map_elem_t camera_locals_dict_table[] = {
}; };
STATIC MP_DEFINE_CONST_DICT(camera_locals_dict, camera_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(camera_locals_dict, camera_locals_dict_table);
const mp_obj_type_t camera_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, camera_type,
.name = MP_QSTR_Camera, MP_QSTR_Camera,
.make_new = camera_make_new, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_dict_t *)&camera_locals_dict, make_new, camera_make_new,
}; locals_dict, &camera_locals_dict
);

View File

@ -83,9 +83,10 @@ STATIC void camera_imageformat_print(const mp_print_t *print, mp_obj_t self_in,
mp_printf(print, "%q.%q.%q", MP_QSTR_camera, MP_QSTR_ImageSize, format); mp_printf(print, "%q.%q.%q", MP_QSTR_camera, MP_QSTR_ImageSize, format);
} }
const mp_obj_type_t camera_imageformat_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, camera_imageformat_type,
.name = MP_QSTR_ImageFormat, MP_QSTR_ImageFormat,
.print = camera_imageformat_print, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_t)&camera_imageformat_locals_dict, print, camera_imageformat_print,
}; locals_dict, &camera_imageformat_locals_dict
);

View File

@ -343,9 +343,10 @@ STATIC const mp_rom_map_elem_t canio_can_locals_dict_table[] = {
}; };
STATIC MP_DEFINE_CONST_DICT(canio_can_locals_dict, canio_can_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(canio_can_locals_dict, canio_can_locals_dict_table);
const mp_obj_type_t canio_can_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, canio_can_type,
.name = MP_QSTR_CAN, MP_QSTR_CAN,
.make_new = canio_can_make_new, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_t)&canio_can_locals_dict, make_new, canio_can_make_new,
}; locals_dict, &canio_can_locals_dict
);

View File

@ -166,13 +166,10 @@ STATIC const mp_rom_map_elem_t canio_listener_locals_dict_table[] = {
}; };
STATIC MP_DEFINE_CONST_DICT(canio_listener_locals_dict, canio_listener_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(canio_listener_locals_dict, canio_listener_locals_dict_table);
const mp_obj_type_t canio_listener_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, canio_listener_type,
.name = MP_QSTR_Listener, MP_QSTR_Listener,
.flags = MP_TYPE_FLAG_EXTENDED, MP_TYPE_FLAG_ITER_IS_ITERNEXT,
.locals_dict = (mp_obj_dict_t *)&canio_listener_locals_dict, .locals_dict = (mp_obj_dict_t *)&canio_listener_locals_dict,
MP_TYPE_EXTENDED_FIELDS( .iternext = canio_iternext
.getiter = mp_identity_getiter, );
.iternext = canio_iternext,
),
};

View File

@ -113,9 +113,10 @@ STATIC const mp_rom_map_elem_t canio_match_locals_dict_table[] = {
}; };
STATIC MP_DEFINE_CONST_DICT(canio_match_locals_dict, canio_match_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(canio_match_locals_dict, canio_match_locals_dict_table);
const mp_obj_type_t canio_match_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, canio_match_type,
.name = MP_QSTR_Match, MP_QSTR_Match,
.make_new = canio_match_make_new, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_dict_t *)&canio_match_locals_dict, make_new, canio_match_make_new,
}; locals_dict, &canio_match_locals_dict
);

View File

@ -136,9 +136,10 @@ STATIC const mp_rom_map_elem_t canio_message_locals_dict_table[] = {
}; };
STATIC MP_DEFINE_CONST_DICT(canio_message_locals_dict, canio_message_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(canio_message_locals_dict, canio_message_locals_dict_table);
const mp_obj_type_t canio_message_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, canio_message_type,
.name = MP_QSTR_Message, MP_QSTR_Message,
.make_new = canio_message_make_new, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_t)&canio_message_locals_dict, make_new, canio_message_make_new,
}; locals_dict, &canio_message_locals_dict
);

View File

@ -136,9 +136,10 @@ STATIC const mp_rom_map_elem_t canio_remote_transmission_request_locals_dict_tab
}; };
STATIC MP_DEFINE_CONST_DICT(canio_remote_transmission_request_locals_dict, canio_remote_transmission_request_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(canio_remote_transmission_request_locals_dict, canio_remote_transmission_request_locals_dict_table);
const mp_obj_type_t canio_remote_transmission_request_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, canio_remote_transmission_request_type,
.name = MP_QSTR_RemoteTransmissionRequest, MP_QSTR_RemoteTransmissionRequest,
.make_new = canio_remote_transmission_request_make_new, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_t)&canio_remote_transmission_request_locals_dict, make_new, canio_remote_transmission_request_make_new,
}; locals_dict, &canio_remote_transmission_request_locals_dict
);

View File

@ -145,9 +145,10 @@ STATIC const mp_rom_map_elem_t countio_counter_locals_dict_table[] = {
}; };
STATIC MP_DEFINE_CONST_DICT(countio_counter_locals_dict, countio_counter_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(countio_counter_locals_dict, countio_counter_locals_dict_table);
const mp_obj_type_t countio_counter_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, countio_counter_type,
.name = MP_QSTR_Counter, MP_QSTR_Counter,
.make_new = countio_counter_make_new, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_dict_t *)&countio_counter_locals_dict, make_new, countio_counter_make_new,
}; locals_dict, &countio_counter_locals_dict
);

View File

@ -359,12 +359,13 @@ STATIC const mp_rom_map_elem_t digitalio_digitalinout_locals_dict_table[] = {
STATIC MP_DEFINE_CONST_DICT(digitalio_digitalinout_locals_dict, digitalio_digitalinout_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(digitalio_digitalinout_locals_dict, digitalio_digitalinout_locals_dict_table);
const mp_obj_type_t digitalio_digitalinout_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, digitalio_digitalinout_type,
.name = MP_QSTR_DigitalInOut, MP_QSTR_DigitalInOut,
.make_new = digitalio_digitalinout_make_new, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_dict_t *)&digitalio_digitalinout_locals_dict, make_new, digitalio_digitalinout_make_new,
}; locals_dict, &digitalio_digitalinout_locals_dict
);
// Helper for validating digitalio.DigitalInOut arguments // Helper for validating digitalio.DigitalInOut arguments
digitalio_digitalinout_obj_t *assert_digitalinout(mp_obj_t obj) { digitalio_digitalinout_obj_t *assert_digitalinout(mp_obj_t obj) {

View File

@ -75,9 +75,10 @@ STATIC void digitalio_direction_print(const mp_print_t *print, mp_obj_t self_in,
mp_printf(print, "%q.%q.%q", MP_QSTR_digitalio, MP_QSTR_Direction, direction); mp_printf(print, "%q.%q.%q", MP_QSTR_digitalio, MP_QSTR_Direction, direction);
} }
const mp_obj_type_t digitalio_direction_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, digitalio_direction_type,
.name = MP_QSTR_Direction, MP_QSTR_Direction,
.print = digitalio_direction_print, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_dict_t *)&digitalio_direction_locals_dict, print, digitalio_direction_print,
}; locals_dict, &digitalio_direction_locals_dict
);

View File

@ -64,9 +64,10 @@ STATIC void digitalio_drive_mode_print(const mp_print_t *print, mp_obj_t self_in
mp_printf(print, "%q.%q.%q", MP_QSTR_digitalio, MP_QSTR_DriveMode, drive_mode); mp_printf(print, "%q.%q.%q", MP_QSTR_digitalio, MP_QSTR_DriveMode, drive_mode);
} }
const mp_obj_type_t digitalio_drive_mode_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, digitalio_drive_mode_type,
.name = MP_QSTR_DriveMode, name, MP_QSTR_DriveMode,
.print = digitalio_drive_mode_print, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_dict_t *)&digitalio_drive_mode_locals_dict, print, digitalio_drive_mode_print,
}; locals_dict, &digitalio_drive_mode_locals_dict
);

View File

@ -66,12 +66,13 @@ STATIC void digitalio_pull_print(const mp_print_t *print, mp_obj_t self_in, mp_p
mp_printf(print, "%q.%q.%q", MP_QSTR_digitalio, MP_QSTR_Pull, pull); mp_printf(print, "%q.%q.%q", MP_QSTR_digitalio, MP_QSTR_Pull, pull);
} }
const mp_obj_type_t digitalio_pull_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, digitalio_pull_type,
.name = MP_QSTR_Pull, MP_TYPE_FLAG_NONE,
.print = digitalio_pull_print, name, MP_QSTR_Pull,
.locals_dict = (mp_obj_dict_t *)&digitalio_pull_locals_dict, print, digitalio_pull_print,
}; locals_dict, &digitalio_pull_locals_dict
);
digitalio_pull_t validate_pull(mp_rom_obj_t obj, qstr arg_name) { digitalio_pull_t validate_pull(mp_rom_obj_t obj, qstr arg_name) {
if (obj == MP_ROM_PTR(&digitalio_pull_up_obj)) { if (obj == MP_ROM_PTR(&digitalio_pull_up_obj)) {

View File

@ -286,14 +286,12 @@ STATIC mp_int_t bitmap_get_buffer(mp_obj_t self_in, mp_buffer_info_t *bufinfo, m
return common_hal_displayio_bitmap_get_buffer(self, bufinfo, flags); return common_hal_displayio_bitmap_get_buffer(self, bufinfo, flags);
} }
const mp_obj_type_t displayio_bitmap_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, displayio_bitmap_type,
.flags = MP_TYPE_FLAG_EXTENDED, MP_QSTR_Bitmap,
.name = MP_QSTR_Bitmap, MP_TYPE_FLAG_NONE,
.make_new = displayio_bitmap_make_new, make_new, displayio_bitmap_make_new,
.locals_dict = (mp_obj_dict_t *)&displayio_bitmap_locals_dict, locals_dict, &displayio_bitmap_locals_dict,
MP_TYPE_EXTENDED_FIELDS( subscr, bitmap_subscr,
.subscr = bitmap_subscr, buffer, bitmap_get_buffer
.buffer_p = { .get_buffer = bitmap_get_buffer }, );
),
};

View File

@ -135,9 +135,10 @@ STATIC const mp_rom_map_elem_t displayio_colorconverter_locals_dict_table[] = {
}; };
STATIC MP_DEFINE_CONST_DICT(displayio_colorconverter_locals_dict, displayio_colorconverter_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(displayio_colorconverter_locals_dict, displayio_colorconverter_locals_dict_table);
const mp_obj_type_t displayio_colorconverter_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, displayio_colorconverter_type,
.name = MP_QSTR_ColorConverter, MP_QSTR_ColorConverter,
.make_new = displayio_colorconverter_make_new, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_dict_t *)&displayio_colorconverter_locals_dict, make_new, displayio_colorconverter_make_new,
}; locals_dict, &displayio_colorconverter_locals_dict
);

View File

@ -527,9 +527,10 @@ STATIC const mp_rom_map_elem_t displayio_display_locals_dict_table[] = {
}; };
STATIC MP_DEFINE_CONST_DICT(displayio_display_locals_dict, displayio_display_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(displayio_display_locals_dict, displayio_display_locals_dict_table);
const mp_obj_type_t displayio_display_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, displayio_display_type,
.name = MP_QSTR_Display, MP_QSTR_Display,
.make_new = displayio_display_make_new, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_dict_t *)&displayio_display_locals_dict, make_new, displayio_display_make_new,
}; locals_dict, &displayio_display_locals_dict
);

View File

@ -428,9 +428,10 @@ STATIC const mp_rom_map_elem_t displayio_epaperdisplay_locals_dict_table[] = {
}; };
STATIC MP_DEFINE_CONST_DICT(displayio_epaperdisplay_locals_dict, displayio_epaperdisplay_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(displayio_epaperdisplay_locals_dict, displayio_epaperdisplay_locals_dict_table);
const mp_obj_type_t displayio_epaperdisplay_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, displayio_epaperdisplay_type,
.name = MP_QSTR_EPaperDisplay, MP_QSTR_EPaperDisplay,
.make_new = displayio_epaperdisplay_make_new, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_dict_t *)&displayio_epaperdisplay_locals_dict, make_new, displayio_epaperdisplay_make_new,
}; locals_dict, &displayio_epaperdisplay_locals_dict
);

View File

@ -165,9 +165,10 @@ STATIC const mp_rom_map_elem_t displayio_fourwire_locals_dict_table[] = {
}; };
STATIC MP_DEFINE_CONST_DICT(displayio_fourwire_locals_dict, displayio_fourwire_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(displayio_fourwire_locals_dict, displayio_fourwire_locals_dict_table);
const mp_obj_type_t displayio_fourwire_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, displayio_fourwire_type,
.name = MP_QSTR_FourWire, MP_QSTR_FourWire,
.make_new = displayio_fourwire_make_new, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_dict_t *)&displayio_fourwire_locals_dict, make_new, displayio_fourwire_make_new,
}; locals_dict, &displayio_fourwire_locals_dict
);

View File

@ -348,15 +348,13 @@ STATIC const mp_rom_map_elem_t displayio_group_locals_dict_table[] = {
}; };
STATIC MP_DEFINE_CONST_DICT(displayio_group_locals_dict, displayio_group_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(displayio_group_locals_dict, displayio_group_locals_dict_table);
const mp_obj_type_t displayio_group_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, displayio_group_type,
.flags = MP_TYPE_FLAG_EXTENDED, MP_QSTR_Group,
.name = MP_QSTR_Group, MP_TYPE_FLAG_ITER_IS_GETITER,
.make_new = displayio_group_make_new, .make_new, displayio_group_make_new,
.locals_dict = (mp_obj_dict_t *)&displayio_group_locals_dict, locals_dict, &displayio_group_locals_dict,
MP_TYPE_EXTENDED_FIELDS( subscr, group_subscr,
.subscr = group_subscr, unary_op, group_unary_op,
.unary_op = group_unary_op, iter, mp_obj_new_generic_iterator
.getiter = mp_obj_new_generic_iterator, );
),
};

View File

@ -129,9 +129,10 @@ STATIC const mp_rom_map_elem_t displayio_i2cdisplay_locals_dict_table[] = {
}; };
STATIC MP_DEFINE_CONST_DICT(displayio_i2cdisplay_locals_dict, displayio_i2cdisplay_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(displayio_i2cdisplay_locals_dict, displayio_i2cdisplay_locals_dict_table);
const mp_obj_type_t displayio_i2cdisplay_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, displayio_i2cdisplay_type,
.name = MP_QSTR_I2CDisplay, MP_QSTR_I2CDisplay,
.make_new = displayio_i2cdisplay_make_new, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_dict_t *)&displayio_i2cdisplay_locals_dict, make_new, displayio_i2cdisplay_make_new,
}; locals_dict, &displayio_i2cdisplay_locals_dict
);

View File

@ -148,9 +148,10 @@ STATIC const mp_rom_map_elem_t displayio_ondiskbitmap_locals_dict_table[] = {
}; };
STATIC MP_DEFINE_CONST_DICT(displayio_ondiskbitmap_locals_dict, displayio_ondiskbitmap_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(displayio_ondiskbitmap_locals_dict, displayio_ondiskbitmap_locals_dict_table);
const mp_obj_type_t displayio_ondiskbitmap_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, displayio_ondiskbitmap_type,
.name = MP_QSTR_OnDiskBitmap, MP_QSTR_OnDiskBitmap,
.make_new = displayio_ondiskbitmap_make_new, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_dict_t *)&displayio_ondiskbitmap_locals_dict, make_new, displayio_ondiskbitmap_make_new,
}; locals_dict, &displayio_ondiskbitmap_locals_dict
);

View File

@ -215,15 +215,14 @@ STATIC const mp_rom_map_elem_t displayio_palette_locals_dict_table[] = {
}; };
STATIC MP_DEFINE_CONST_DICT(displayio_palette_locals_dict, displayio_palette_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(displayio_palette_locals_dict, displayio_palette_locals_dict_table);
const mp_obj_type_t displayio_palette_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, displayio_palette_type,
.flags = MP_TYPE_FLAG_EXTENDED, MP_QSTR_Palette,
.name = MP_QSTR_Palette, MP_TYPE_FLAG_ITER_IS_GETITER,
.make_new = displayio_palette_make_new, make_new, displayio_palette_make_new,
.locals_dict = (mp_obj_dict_t *)&displayio_palette_locals_dict, locals_dict, &displayio_palette_locals_dict,
MP_TYPE_EXTENDED_FIELDS( subscr, palette_subscr,
.subscr = palette_subscr, unary_op, group_unary_op,
.unary_op = group_unary_op, iter, mp_obj_new_generic_iterator
.getiter = mp_obj_new_generic_iterator,
), );
};

View File

@ -93,9 +93,10 @@ STATIC const mp_rom_map_elem_t displayio_shape_locals_dict_table[] = {
}; };
STATIC MP_DEFINE_CONST_DICT(displayio_shape_locals_dict, displayio_shape_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(displayio_shape_locals_dict, displayio_shape_locals_dict_table);
const mp_obj_type_t displayio_shape_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, displayio_shape_type,
.name = MP_QSTR_Shape, MP_QSTR_Shape,
.make_new = displayio_shape_make_new, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_dict_t *)&displayio_shape_locals_dict, make_new, displayio_shape_make_new,
}; locals_dict, &displayio_shape_locals_dict
);

View File

@ -503,13 +503,12 @@ STATIC const mp_rom_map_elem_t displayio_tilegrid_locals_dict_table[] = {
}; };
STATIC MP_DEFINE_CONST_DICT(displayio_tilegrid_locals_dict, displayio_tilegrid_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(displayio_tilegrid_locals_dict, displayio_tilegrid_locals_dict_table);
const mp_obj_type_t displayio_tilegrid_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, displayio_tilegrid_type,
.flags = MP_TYPE_FLAG_EXTENDED, MP_TYPE_FLAG_EXTENDED,
.name = MP_QSTR_TileGrid, MP_TYPE_FLAG_NONE,
.make_new = displayio_tilegrid_make_new, name, MP_QSTR_TileGrid,
.locals_dict = (mp_obj_dict_t *)&displayio_tilegrid_locals_dict, make_new, displayio_tilegrid_make_new,
MP_TYPE_EXTENDED_FIELDS( locals_dict, &displayio_tilegrid_locals_dict,
.subscr = tilegrid_subscr, .subscr, tilegrid_subscr
), );
};

View File

@ -106,8 +106,9 @@ STATIC const mp_rom_map_elem_t fontio_builtinfont_locals_dict_table[] = {
}; };
STATIC MP_DEFINE_CONST_DICT(fontio_builtinfont_locals_dict, fontio_builtinfont_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(fontio_builtinfont_locals_dict, fontio_builtinfont_locals_dict_table);
const mp_obj_type_t fontio_builtinfont_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, fontio_builtinfont_type,
.name = MP_QSTR_BuiltinFont, MP_QSTR_BuiltinFont,
.locals_dict = (mp_obj_dict_t *)&fontio_builtinfont_locals_dict, MP_TYPE_FLAG_NONE,
}; locals_dict, &fontio_builtinfont_locals_dict
);

View File

@ -369,9 +369,10 @@ STATIC const mp_rom_map_elem_t framebufferio_framebufferdisplay_locals_dict_tabl
}; };
STATIC MP_DEFINE_CONST_DICT(framebufferio_framebufferdisplay_locals_dict, framebufferio_framebufferdisplay_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(framebufferio_framebufferdisplay_locals_dict, framebufferio_framebufferdisplay_locals_dict_table);
const mp_obj_type_t framebufferio_framebufferdisplay_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, framebufferio_framebufferdisplay_type,
.name = MP_QSTR_FramebufferDisplay, MP_QSTR_FramebufferDisplay,
.make_new = framebufferio_framebufferdisplay_make_new, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_dict_t *)&framebufferio_framebufferdisplay_locals_dict, make_new, framebufferio_framebufferdisplay_make_new,
}; locals_dict, &framebufferio_framebufferdisplay_locals_dict
);

View File

@ -217,9 +217,10 @@ STATIC const mp_rom_map_elem_t frequencyio_frequencyin_locals_dict_table[] = {
}; };
STATIC MP_DEFINE_CONST_DICT(frequencyio_frequencyin_locals_dict, frequencyio_frequencyin_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(frequencyio_frequencyin_locals_dict, frequencyio_frequencyin_locals_dict_table);
const mp_obj_type_t frequencyio_frequencyin_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, frequencyio_frequencyin_type,
.name = MP_QSTR_frequencyin, MP_QSTR_frequencyin,
.make_new = frequencyio_frequencyin_make_new, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_dict_t *)&frequencyio_frequencyin_locals_dict, make_new, frequencyio_frequencyin_make_new,
}; locals_dict, &frequencyio_frequencyin_locals_dict
);

View File

@ -158,9 +158,10 @@ STATIC const mp_rom_map_elem_t gifio_gifwriter_locals_table[] = {
STATIC MP_DEFINE_CONST_DICT(gifio_gifwriter_locals, gifio_gifwriter_locals_table); STATIC MP_DEFINE_CONST_DICT(gifio_gifwriter_locals, gifio_gifwriter_locals_table);
const mp_obj_type_t gifio_gifwriter_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, gifio_gifwriter_type,
.name = MP_QSTR_GifWriter, MP_QSTR_GifWriter,
.make_new = gifio_gifwriter_make_new, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_dict_t *)&gifio_gifwriter_locals, make_new, gifio_gifwriter_make_new,
}; locals_dict, &gifio_gifwriter_locals
);

View File

@ -320,9 +320,10 @@ STATIC const mp_rom_map_elem_t gifio_ondiskgif_locals_dict_table[] = {
}; };
STATIC MP_DEFINE_CONST_DICT(gifio_ondiskgif_locals_dict, gifio_ondiskgif_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(gifio_ondiskgif_locals_dict, gifio_ondiskgif_locals_dict_table);
const mp_obj_type_t gifio_ondiskgif_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, gifio_ondiskgif_type,
.name = MP_QSTR_OnDiskGif, MP_QSTR_OnDiskGif,
.make_new = gifio_ondiskgif_make_new, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_dict_t *)&gifio_ondiskgif_locals_dict, make_new, gifio_ondiskgif_make_new,
}; locals_dict, &gifio_ondiskgif_locals_dict
);

View File

@ -169,9 +169,10 @@ STATIC const mp_rom_map_elem_t gnss_locals_dict_table[] = {
}; };
STATIC MP_DEFINE_CONST_DICT(gnss_locals_dict, gnss_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(gnss_locals_dict, gnss_locals_dict_table);
const mp_obj_type_t gnss_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, gnss_type,
.name = MP_QSTR_GNSS, MP_QSTR_GNSS,
.make_new = gnss_make_new, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_dict_t *)&gnss_locals_dict, make_new, gnss_make_new,
}; locals_dict, &gnss_locals_dict
);

View File

@ -71,9 +71,10 @@ STATIC void gnss_positionfix_print(const mp_print_t *print, mp_obj_t self_in, mp
mp_printf(print, "%q.%q.%q", MP_QSTR_gnss, MP_QSTR_PositionFix, posfix); mp_printf(print, "%q.%q.%q", MP_QSTR_gnss, MP_QSTR_PositionFix, posfix);
} }
const mp_obj_type_t gnss_positionfix_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, gnss_positionfix_type,
.name = MP_QSTR_PositionFix, MP_QSTR_PositionFix,
.print = gnss_positionfix_print, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_t)&gnss_positionfix_locals_dict, print, gnss_positionfix_print,
}; locals_dict, &gnss_positionfix_locals_dict
);

View File

@ -104,9 +104,10 @@ STATIC void gnss_satellitesystem_print(const mp_print_t *print, mp_obj_t self_in
mp_printf(print, "%q.%q.%q", MP_QSTR_gnss, MP_QSTR_SatelliteSystem, system); mp_printf(print, "%q.%q.%q", MP_QSTR_gnss, MP_QSTR_SatelliteSystem, system);
} }
const mp_obj_type_t gnss_satellitesystem_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, gnss_satellitesystem_type,
.name = MP_QSTR_SatelliteSystem, MP_QSTR_SatelliteSystem,
.print = gnss_satellitesystem_print, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_t)&gnss_satellitesystem_locals_dict, print, gnss_satellitesystem_print,
}; locals_dict, &gnss_satellitesystem_locals_dict
);

View File

@ -89,8 +89,9 @@ STATIC const mp_rom_map_elem_t hashlib_hash_locals_dict_table[] = {
STATIC MP_DEFINE_CONST_DICT(hashlib_hash_locals_dict, hashlib_hash_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(hashlib_hash_locals_dict, hashlib_hash_locals_dict_table);
const mp_obj_type_t hashlib_hash_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, hashlib_hash_type,
.name = MP_QSTR_Hash, MP_QSTR_Hash,
.locals_dict = (mp_obj_dict_t *)&hashlib_hash_locals_dict, MP_TYPE_FLAG_NONE,
}; locals_dict, &hashlib_hash_locals_dict
);

View File

@ -416,9 +416,10 @@ STATIC const mp_rom_map_elem_t i2ctarget_i2c_target_request_locals_dict_table[]
STATIC MP_DEFINE_CONST_DICT(i2ctarget_i2c_target_request_locals_dict, i2ctarget_i2c_target_request_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(i2ctarget_i2c_target_request_locals_dict, i2ctarget_i2c_target_request_locals_dict_table);
const mp_obj_type_t i2ctarget_i2c_target_request_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, i2ctarget_i2c_target_request_type,
.name = MP_QSTR_I2CTargetRequest, MP_QSTR_I2CTargetRequest,
.make_new = i2ctarget_i2c_target_request_make_new, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_dict_t *)&i2ctarget_i2c_target_request_locals_dict, make_new, i2ctarget_i2c_target_request_make_new,
}; locals_dict, &i2ctarget_i2c_target_request_locals_dict
);

View File

@ -189,9 +189,10 @@ STATIC const mp_rom_map_elem_t imagecapture_parallelimagecapture_locals_dict_tab
STATIC MP_DEFINE_CONST_DICT(imagecapture_parallelimagecapture_locals_dict, imagecapture_parallelimagecapture_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(imagecapture_parallelimagecapture_locals_dict, imagecapture_parallelimagecapture_locals_dict_table);
const mp_obj_type_t imagecapture_parallelimagecapture_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, imagecapture_parallelimagecapture_type,
.name = MP_QSTR_ParallelImageCapture, MP_QSTR_ParallelImageCapture,
.make_new = imagecapture_parallelimagecapture_make_new, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_dict_t *)&imagecapture_parallelimagecapture_locals_dict, make_new, imagecapture_parallelimagecapture_make_new,
}; locals_dict, &imagecapture_parallelimagecapture_locals_dict
);

View File

@ -175,15 +175,13 @@ STATIC const mp_rom_map_elem_t ipaddress_ipv4address_locals_dict_table[] = {
STATIC MP_DEFINE_CONST_DICT(ipaddress_ipv4address_locals_dict, ipaddress_ipv4address_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(ipaddress_ipv4address_locals_dict, ipaddress_ipv4address_locals_dict_table);
const mp_obj_type_t ipaddress_ipv4address_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, ipaddress_ipv4address_type,
.flags = MP_TYPE_FLAG_EXTENDED, MP_QSTR_Address,
.name = MP_QSTR_Address, MP_TYPE_FLAG_NONE,
.make_new = ipaddress_ipv4address_make_new, make_new, ipaddress_ipv4address_make_new,
.locals_dict = (mp_obj_dict_t *)&ipaddress_ipv4address_locals_dict, locals_dict, &ipaddress_ipv4address_locals_dict,
.print = ipaddress_ipv4address_print, print, ipaddress_ipv4address_print,
MP_TYPE_EXTENDED_FIELDS( unary_op, ipaddress_ipv4address_unary_op,
.unary_op = ipaddress_ipv4address_unary_op, binary_op, ipaddress_ipv4address_binary_op
.binary_op = ipaddress_ipv4address_binary_op, );
)
};

View File

@ -292,14 +292,12 @@ STATIC mp_int_t is31fl3741_FrameBuffer_get_buffer(mp_obj_t self_in, mp_buffer_in
return 0; return 0;
} }
const mp_obj_type_t is31fl3741_FrameBuffer_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, is31fl3741_FrameBuffer_type,
.flags = MP_TYPE_FLAG_EXTENDED, MP_QSTR_is31fl3741,
.name = MP_QSTR_is31fl3741, MP_TYPE_FLAG_NONE,
.locals_dict = (mp_obj_dict_t *)&is31fl3741_FrameBuffer_locals_dict, locals_dict, &is31fl3741_FrameBuffer_locals_dict,
.make_new = is31fl3741_FrameBuffer_make_new, make_new, is31fl3741_FrameBuffer_make_new,
MP_TYPE_EXTENDED_FIELDS( buffer, is31fl3741_FrameBuffer_get_buffer,
.buffer_p = { .get_buffer = is31fl3741_FrameBuffer_get_buffer, }, protocol, &is31fl3741_FrameBuffer_proto
.protocol = &is31fl3741_FrameBuffer_proto, );
),
};

View File

@ -172,9 +172,10 @@ STATIC const mp_rom_map_elem_t is31fl3741_IS31FL3741_locals_dict_table[] = {
}; };
STATIC MP_DEFINE_CONST_DICT(is31fl3741_IS31FL3741_locals_dict, is31fl3741_IS31FL3741_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(is31fl3741_IS31FL3741_locals_dict, is31fl3741_IS31FL3741_locals_dict_table);
const mp_obj_type_t is31fl3741_IS31FL3741_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, is31fl3741_IS31FL3741_type,
.name = MP_QSTR_is31fl3741, MP_QSTR_is31fl3741,
.locals_dict = (mp_obj_dict_t *)&is31fl3741_IS31FL3741_locals_dict, MP_TYPE_FLAG_NONE,
.make_new = is31fl3741_IS31FL3741_make_new, locals_dict, &is31fl3741_IS31FL3741_locals_dict,
}; make_new, is31fl3741_IS31FL3741_make_new
);

View File

@ -180,15 +180,13 @@ STATIC const mp_rom_map_elem_t keypad_event_locals_dict_table[] = {
}; };
STATIC MP_DEFINE_CONST_DICT(keypad_event_locals_dict, keypad_event_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(keypad_event_locals_dict, keypad_event_locals_dict_table);
const mp_obj_type_t keypad_event_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, keypad_event_type,
.flags = MP_TYPE_FLAG_EXTENDED, MP_QSTR_Event,
.name = MP_QSTR_Event, MP_TYPE_FLAG_NONE,
.make_new = keypad_event_make_new, make_new, keypad_event_make_new,
.print = keypad_event_print, print, keypad_event_print,
.locals_dict = (mp_obj_dict_t *)&keypad_event_locals_dict, locals_dict, &keypad_event_locals_dict,
MP_TYPE_EXTENDED_FIELDS( unary_op, keypad_event_unary_op,
.unary_op = keypad_event_unary_op, binary_op, keypad_event_binary_op
.binary_op = keypad_event_binary_op, );
),
};

View File

@ -165,15 +165,13 @@ STATIC const mp_stream_p_t eventqueue_p = {
#endif #endif
const mp_obj_type_t keypad_eventqueue_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, keypad_eventqueue_type,
.flags = MP_TYPE_FLAG_EXTENDED, P_QSTR_EventQueue,
.name = MP_QSTR_EventQueue, MP_TYPE_FLAG_NONE,
MP_TYPE_EXTENDED_FIELDS( unary_op, keypad_eventqueue_unary_op,
.unary_op = keypad_eventqueue_unary_op,
#if MICROPY_PY_USELECT #if MICROPY_PY_USELECT
.protocol = &eventqueue_p, protocol, &eventqueue_p,
#endif #endif
), locals_dict, &keypad_eventqueue_locals_dict
.locals_dict = (mp_obj_t)&keypad_eventqueue_locals_dict, );
};

View File

@ -235,11 +235,12 @@ STATIC MP_DEFINE_CONST_DICT(keypad_keymatrix_locals_dict, keypad_keymatrix_local
#endif #endif
const mp_obj_type_t keypad_keymatrix_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, keypad_keymatrix_type,
.name = MP_QSTR_KeyMatrix, MP_QSTR_KeyMatrix,
.make_new = keypad_keymatrix_make_new, MP_TYPE_FLAG_NONE,
make_new, keypad_keymatrix_make_new
#if CIRCUITPY_KEYPAD_KEYMATRIX #if CIRCUITPY_KEYPAD_KEYMATRIX
.locals_dict = (mp_obj_t)&keypad_keymatrix_locals_dict, , locals_dict, &keypad_keymatrix_locals_dict
#endif #endif
}; );

View File

@ -169,11 +169,12 @@ STATIC const mp_rom_map_elem_t keypad_keys_locals_dict_table[] = {
STATIC MP_DEFINE_CONST_DICT(keypad_keys_locals_dict, keypad_keys_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(keypad_keys_locals_dict, keypad_keys_locals_dict_table);
#endif #endif
const mp_obj_type_t keypad_keys_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, keypad_keys_type,
.name = MP_QSTR_Keys, MP_QSTR_Keys,
.make_new = keypad_keys_make_new, MP_TYPE_FLAG_NONE,
.make_new = keypad_keys_make_new
#if CIRCUITPY_KEYPAD_KEYS #if CIRCUITPY_KEYPAD_KEYS
.locals_dict = (mp_obj_t)&keypad_keys_locals_dict, , locals_dict, &keypad_keys_locals_dict
#endif #endif
}; );

View File

@ -221,11 +221,12 @@ STATIC const mp_rom_map_elem_t keypad_shiftregisterkeys_locals_dict_table[] = {
STATIC MP_DEFINE_CONST_DICT(keypad_shiftregisterkeys_locals_dict, keypad_shiftregisterkeys_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(keypad_shiftregisterkeys_locals_dict, keypad_shiftregisterkeys_locals_dict_table);
#endif #endif
const mp_obj_type_t keypad_shiftregisterkeys_type = { MP_DEFINE_CONST_OBJ_TYPE(
{ &mp_type_type }, keypad_shiftregisterkeys_type,
.name = MP_QSTR_ShiftRegisterKeys, MP_QSTR_ShiftRegisterKeys,
.make_new = keypad_shiftregisterkeys_make_new, MP_TYPE_FLAG_NONE,
make_new, keypad_shiftregisterkeys_make_new
#if CIRCUITPY_KEYPAD_SHIFTREGISTERKEYS #if CIRCUITPY_KEYPAD_SHIFTREGISTERKEYS
.locals_dict = (mp_obj_t)&keypad_shiftregisterkeys_locals_dict, , locals_dict, &keypad_shiftregisterkeys_locals_dict
#endif #endif
}; );

Some files were not shown because too many files have changed in this diff Show More