Fix DotClockFrameBuffer type definition
also remove unnecessary `const` with `MP_DEFINE_CONST_TYPE_OBJ` in I2C
This commit is contained in:
parent
2f391e5679
commit
021926c96a
@ -388,7 +388,7 @@ 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_DEFINE_CONST_OBJ_TYPE(
|
MP_DEFINE_CONST_OBJ_TYPE(
|
||||||
busio_i2c_type,
|
busio_i2c_type,
|
||||||
MP_QSTR_I2C,
|
MP_QSTR_I2C,
|
||||||
MP_TYPE_FLAG_NONE,
|
MP_TYPE_FLAG_NONE,
|
||||||
|
@ -382,14 +382,12 @@ STATIC const mp_rom_map_elem_t dotclockframebuffer_framebuffer_locals_dict_table
|
|||||||
};
|
};
|
||||||
STATIC MP_DEFINE_CONST_DICT(dotclockframebuffer_framebuffer_locals_dict, dotclockframebuffer_framebuffer_locals_dict_table);
|
STATIC MP_DEFINE_CONST_DICT(dotclockframebuffer_framebuffer_locals_dict, dotclockframebuffer_framebuffer_locals_dict_table);
|
||||||
|
|
||||||
const mp_obj_type_t dotclockframebuffer_framebuffer_type = {
|
MP_DEFINE_CONST_OBJ_TYPE(
|
||||||
{ &mp_type_type },
|
dotclockframebuffer_framebuffer_type,
|
||||||
.flags = MP_TYPE_FLAG_EXTENDED,
|
MP_QSTR_DotClockFramebuffer,
|
||||||
.name = MP_QSTR_DotClockFramebuffer,
|
MP_TYPE_FLAG_NONE,
|
||||||
.make_new = dotclockframebuffer_framebuffer_make_new,
|
make_new, dotclockframebuffer_framebuffer_make_new,
|
||||||
.locals_dict = (mp_obj_dict_t *)&dotclockframebuffer_framebuffer_locals_dict,
|
locals_dict, &dotclockframebuffer_framebuffer_locals_dict,
|
||||||
MP_TYPE_EXTENDED_FIELDS(
|
buffer, dotclockframebuffer_framebuffer_get_buffer,
|
||||||
.buffer_p = { .get_buffer = dotclockframebuffer_framebuffer_get_buffer, },
|
protocol, &dotclockframebuffer_framebuffer_proto
|
||||||
.protocol = &dotclockframebuffer_framebuffer_proto,
|
);
|
||||||
),
|
|
||||||
};
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user