File tree Expand file tree Collapse file tree 2 files changed +11
-8
lines changed Expand file tree Collapse file tree 2 files changed +11
-8
lines changed Original file line number Diff line number Diff line change 3939 mp_obj_array_t * view1 ;
4040 mp_obj_array_t * view2 ;
4141
42- void * transmitting_buf ;
42+ void * last_buf ;
4343
4444 } mp_lcd_rgb_bus_obj_t ;
4545
Original file line number Diff line number Diff line change 5656 rgb_panel_t * rgb_panel = __containerof (panel , rgb_panel_t , base );
5757 mp_lcd_rgb_bus_obj_t * self = (mp_lcd_rgb_bus_obj_t * )user_ctx ;
5858
59- if (!self -> trans_done && rgb_panel -> fbs [rgb_panel -> cur_fb_index ] == self -> transmitting_buf ) {
60- if (self -> callback != mp_const_none && mp_obj_is_callable (self -> callback )) {
61- cb_isr (self -> callback );
62- }
63- self -> trans_done = true;
59+ void * curr_buf = rgb_panel -> fbs [rgb_panel -> cur_fb_index ]
60+
61+ if (self -> view2 != NULL && self -> last_buf != curr_buf ) {
62+ self -> last_buf = curr_buf ;
63+ self -> trans_done = true;
64+
65+ if (self -> callback != mp_const_none ) cb_isr (self -> callback );
66+ } else if (self -> view2 == NULL ) {
67+ self -> trans_done = true;
6468 }
6569
6670 return false;
534538 mp_lcd_rgb_bus_obj_t * self = (mp_lcd_rgb_bus_obj_t * )obj ;
535539
536540 self -> trans_done = false;
537- self -> transmitting_buf = color ;
538541
539542 esp_err_t ret = esp_lcd_panel_draw_bitmap (
540543 self -> panel_handle ,
550553 return LCD_OK ;
551554 }
552555
553- if (self -> callback == mp_const_none || ! self -> panel_io_config . flags . double_fb ) {
556+ if (self -> callback == mp_const_none || self -> view2 == NULL ) {
554557 while (!self -> trans_done ) {}
555558 self -> trans_done = false;
556559 }
You can’t perform that action at this time.
0 commit comments