arch(driver): new driver architecture with new color format support

This commit is contained in:
Gabor Kiss-Vamosi
2023-02-20 20:50:58 +01:00
parent df789ed3c7
commit 124f9b0f9f
425 changed files with 25232 additions and 24168 deletions

View File

@@ -59,7 +59,7 @@ void lv_example_table_1(void)
lv_obj_center(table);
/*Add an event callback to to apply some custom drawing*/
lv_obj_add_event_cb(table, draw_part_event_cb, LV_EVENT_DRAW_PART_BEGIN, NULL);
lv_obj_add_event(table, draw_part_event_cb, LV_EVENT_DRAW_PART_BEGIN, NULL);
}
#endif

View File

@@ -1,5 +1,5 @@
def draw_part_event_cb(e):
obj = e.get_target()
obj = e.get_target_obj()
dsc = lv.obj_draw_part_dsc_t.__cast__(e.get_param())
# If the cells are drawn../
if dsc.part == lv.PART.ITEMS:
@@ -49,5 +49,5 @@ table.set_height(200)
table.center()
# Add an event callback to apply some custom drawing
table.add_event_cb(draw_part_event_cb, lv.EVENT.DRAW_PART_BEGIN, None)
table.add_event(draw_part_event_cb, lv.EVENT.DRAW_PART_BEGIN, None)

View File

@@ -81,8 +81,8 @@ void lv_example_table_2(void)
lv_obj_align(table, LV_ALIGN_CENTER, 0, -20);
/*Add an event callback to to apply some custom drawing*/
lv_obj_add_event_cb(table, draw_event_cb, LV_EVENT_DRAW_PART_END, NULL);
lv_obj_add_event_cb(table, change_event_cb, LV_EVENT_VALUE_CHANGED, NULL);
lv_obj_add_event(table, draw_event_cb, LV_EVENT_DRAW_PART_END, NULL);
lv_obj_add_event(table, change_event_cb, LV_EVENT_VALUE_CHANGED, NULL);
lv_mem_monitor_t mon2;
lv_mem_monitor(&mon2);

View File

@@ -4,7 +4,7 @@ import gc
ITEM_CNT = 200
def draw_event_cb(e):
obj = e.get_target()
obj = e.get_target_obj()
dsc = lv.obj_draw_part_dsc_t.__cast__(e.get_param())
# If the cells are drawn...
if dsc.part == lv.PART.ITEMS:
@@ -40,7 +40,7 @@ def draw_event_cb(e):
dsc.draw_ctx.rect(rect_dsc, sw_area)
def change_event_cb(e):
obj = e.get_target()
obj = e.get_target_obj()
row = lv.C_Pointer()
col = lv.C_Pointer()
table.get_selected_cell(row, col)
@@ -81,8 +81,8 @@ for i in range(ITEM_CNT):
table.align(lv.ALIGN.CENTER, 0, -20)
# Add an event callback to apply some custom drawing
table.add_event_cb(draw_event_cb, lv.EVENT.DRAW_PART_END, None)
table.add_event_cb(change_event_cb, lv.EVENT.VALUE_CHANGED, None)
table.add_event(draw_event_cb, lv.EVENT.DRAW_PART_END, None)
table.add_event(change_event_cb, lv.EVENT.VALUE_CHANGED, None)
gc.collect()
mem_used = mem_free - gc.mem_free()