@@ -178,11 +178,24 @@ MP_DEFINE_CONST_FUN_OBJ_1(picodvi_framebuffer_get_height_obj, picodvi_framebuffe
178
178
MP_PROPERTY_GETTER (picodvi_framebuffer_height_obj ,
179
179
(mp_obj_t )& picodvi_framebuffer_get_height_obj );
180
180
181
+ //| color_depth: int
182
+ //| """The width of the framebuffer, in pixels. It may be doubled for output."""
183
+ static mp_obj_t picodvi_framebuffer_get_color_depth (mp_obj_t self_in ) {
184
+ picodvi_framebuffer_obj_t * self = (picodvi_framebuffer_obj_t * )self_in ;
185
+ check_for_deinit (self );
186
+ return MP_OBJ_NEW_SMALL_INT (common_hal_picodvi_framebuffer_get_color_depth (self ));
187
+ }
188
+ MP_DEFINE_CONST_FUN_OBJ_1 (picodvi_framebuffer_get_color_depth_obj , picodvi_framebuffer_get_color_depth );
189
+ MP_PROPERTY_GETTER (picodvi_framebuffer_color_depth_obj ,
190
+ (mp_obj_t )& picodvi_framebuffer_get_color_depth_obj );
191
+
192
+
181
193
static const mp_rom_map_elem_t picodvi_framebuffer_locals_dict_table [] = {
182
194
{ MP_ROM_QSTR (MP_QSTR_deinit ), MP_ROM_PTR (& picodvi_framebuffer_deinit_obj ) },
183
195
184
196
{ MP_ROM_QSTR (MP_QSTR_width ), MP_ROM_PTR (& picodvi_framebuffer_width_obj ) },
185
197
{ MP_ROM_QSTR (MP_QSTR_height ), MP_ROM_PTR (& picodvi_framebuffer_height_obj ) },
198
+ { MP_ROM_QSTR (MP_QSTR_color_depth ), MP_ROM_PTR (& picodvi_framebuffer_color_depth_obj ) },
186
199
};
187
200
static MP_DEFINE_CONST_DICT (picodvi_framebuffer_locals_dict , picodvi_framebuffer_locals_dict_table ) ;
188
201
0 commit comments