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
@@ -192,11 +192,12 @@ STATIC const mp_machine_i2c_p_t machine_hw_i2c_p = {
|
||||
.transfer = machine_hw_i2c_transfer,
|
||||
};
|
||||
|
||||
const mp_obj_type_t machine_hw_i2c_type = {
|
||||
{ &mp_type_type },
|
||||
.name = MP_QSTR_I2C,
|
||||
.print = machine_hw_i2c_print,
|
||||
.make_new = machine_hw_i2c_make_new,
|
||||
.protocol = &machine_hw_i2c_p,
|
||||
.locals_dict = (mp_obj_dict_t *)&mp_machine_i2c_locals_dict,
|
||||
};
|
||||
MP_DEFINE_CONST_OBJ_TYPE(
|
||||
machine_hw_i2c_type,
|
||||
MP_QSTR_I2C,
|
||||
MP_TYPE_FLAG_NONE,
|
||||
machine_hw_i2c_make_new,
|
||||
print, machine_hw_i2c_print,
|
||||
protocol, &machine_hw_i2c_p,
|
||||
locals_dict, (mp_obj_dict_t *)&mp_machine_i2c_locals_dict
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user