Description
my first thoughts about the two buffers secinario.
- the LVGL processes the First buffer then calls
disp_flush
. - the
disp_flush
sends the buffer to thefree
DMA then return and acknowledges usinglv_disp_flush_ready
. - the DMA is now sending the data to the LCD in the background.
- the LVGL processes the Second buffer then calls
disp_flush
. - the DMA is now
busy
sending the data in First buffer, thedisp_flush
would lock till the DMA isfree
.
then sends the second buffer to DMA and then acknowledges usinglv_disp_flush_ready
. - the LVGL again processes the First buffer and repeats.
If this is right, then what is the use of the acknowledgment using lv_disp_flush_ready
?
it always sits at the end of the disp_flush
function.
the flush function wouldn’t return if the DMA isn’t free at the moment. then the LVGL will not proceed also.
=================
another approach is to call the lv_disp_flush_ready
after the DMA finishes, using interrupts.
and not at the end of the disp_flush
function.