mirror of
https://github.com/micropython/micropython.git
synced 2026-01-04 19:20:22 +01:00
all: Make all mp_obj_type_t defs use MP_DEFINE_CONST_OBJ_TYPE.
In preparation for upcoming rework of mp_obj_type_t layout. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This commit is contained in:
committed by
Damien George
parent
cdb880789f
commit
662b9761b3
@@ -376,13 +376,14 @@ STATIC const mp_rom_map_elem_t rp2_pio_locals_dict_table[] = {
|
||||
};
|
||||
STATIC MP_DEFINE_CONST_DICT(rp2_pio_locals_dict, rp2_pio_locals_dict_table);
|
||||
|
||||
const mp_obj_type_t rp2_pio_type = {
|
||||
{ &mp_type_type },
|
||||
.name = MP_QSTR_PIO,
|
||||
.print = rp2_pio_print,
|
||||
.make_new = rp2_pio_make_new,
|
||||
.locals_dict = (mp_obj_dict_t *)&rp2_pio_locals_dict,
|
||||
};
|
||||
MP_DEFINE_CONST_OBJ_TYPE(
|
||||
rp2_pio_type,
|
||||
MP_QSTR_PIO,
|
||||
MP_TYPE_FLAG_NONE,
|
||||
rp2_pio_make_new,
|
||||
print, rp2_pio_print,
|
||||
locals_dict, (mp_obj_dict_t *)&rp2_pio_locals_dict
|
||||
);
|
||||
|
||||
STATIC mp_uint_t rp2_pio_irq_trigger(mp_obj_t self_in, mp_uint_t new_trigger) {
|
||||
rp2_pio_obj_t *self = MP_OBJ_TO_PTR(self_in);
|
||||
@@ -806,13 +807,14 @@ STATIC const mp_rom_map_elem_t rp2_state_machine_locals_dict_table[] = {
|
||||
};
|
||||
STATIC MP_DEFINE_CONST_DICT(rp2_state_machine_locals_dict, rp2_state_machine_locals_dict_table);
|
||||
|
||||
const mp_obj_type_t rp2_state_machine_type = {
|
||||
{ &mp_type_type },
|
||||
.name = MP_QSTR_StateMachine,
|
||||
.print = rp2_state_machine_print,
|
||||
.make_new = rp2_state_machine_make_new,
|
||||
.locals_dict = (mp_obj_dict_t *)&rp2_state_machine_locals_dict,
|
||||
};
|
||||
MP_DEFINE_CONST_OBJ_TYPE(
|
||||
rp2_state_machine_type,
|
||||
MP_QSTR_StateMachine,
|
||||
MP_TYPE_FLAG_NONE,
|
||||
rp2_state_machine_make_new,
|
||||
print, rp2_state_machine_print,
|
||||
locals_dict, (mp_obj_dict_t *)&rp2_state_machine_locals_dict
|
||||
);
|
||||
|
||||
STATIC mp_uint_t rp2_state_machine_irq_trigger(mp_obj_t self_in, mp_uint_t new_trigger) {
|
||||
rp2_state_machine_obj_t *self = MP_OBJ_TO_PTR(self_in);
|
||||
|
||||
Reference in New Issue
Block a user