Is there any function to check if all the draw tasks are finished?
I know that whenever a (joined) area is drawn, the callback will be called.
If there are multiple joined areas, will the current mechanism wait for all areas being redrawn and called the flush callback “once”? (Based on the document, I think no.)
I need to wait for all the draw tasks finished before I render them to my device.
Any suggestions are appreciated.
Many thanks for your help.
If there are multiple joined areas, will the current mechanism wait for all areas being redrawn and called the flush callback “once”? (Based on the document, I think no.)
I have done a test on this with an online debugger. When the buffer is set to a smaller size than the whole frame, flushing callback is called more than once.
I am thinking to use display “chip_select signal( cs = 0 )” in “lv_disp_flush_is_first” and display “chip_deselect signal( cs = 1 )” in “lv_disp_flush_is_last”.
This way i can control the chip select signal from the display as if it were an information packet (command plus display data(pixels)).
I think it is important not to leave the chip select fixed at logic level 0, because i think that toggle chip select reset state machine of display controller.
If the display goes into an unknown state, it may crash the display controller with fixed chip select( cs = 0 ).
void my_flush_cb(...)
{
static bool first = true;
if( first == true )
{
first = false;
CS = 0;
}
....
....
....
if( lv_disp_flush_is_last(drv) )
{
first = true;
// Wait for the end of the transmission
CS = 1;
}
}