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
@@ -829,16 +829,17 @@ STATIC const mp_stream_p_t i2s_stream_p = {
|
||||
.is_text = false,
|
||||
};
|
||||
|
||||
const mp_obj_type_t machine_i2s_type = {
|
||||
{ &mp_type_type },
|
||||
.name = MP_QSTR_I2S,
|
||||
.print = machine_i2s_print,
|
||||
.getiter = mp_identity_getiter,
|
||||
.iternext = mp_stream_unbuffered_iter,
|
||||
.protocol = &i2s_stream_p,
|
||||
.make_new = machine_i2s_make_new,
|
||||
.locals_dict = (mp_obj_dict_t *)&machine_i2s_locals_dict,
|
||||
};
|
||||
MP_DEFINE_CONST_OBJ_TYPE(
|
||||
machine_i2s_type,
|
||||
MP_QSTR_I2S,
|
||||
MP_TYPE_FLAG_NONE,
|
||||
machine_i2s_make_new,
|
||||
print, machine_i2s_print,
|
||||
getiter, mp_identity_getiter,
|
||||
iternext, mp_stream_unbuffered_iter,
|
||||
protocol, &i2s_stream_p,
|
||||
locals_dict, (mp_obj_dict_t *)&machine_i2s_locals_dict
|
||||
);
|
||||
|
||||
MP_REGISTER_ROOT_POINTER(struct _machine_i2s_obj_t *machine_i2s_obj[I2S_NUM_MAX]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user