for example this in flushcb breaks work because return without flush ready call, but your code seems have some base loop issue.
Dont use empty loops try toggle gpio inside as minimum code.
are you calling lv_flush_ready in your flush function? You should be… Also you need to call lv_task_handler in looping code and you also need to call lv_tick_inc from the same loop…
void flush_cb(lv_display_t * disp, lv_area_t area, uint8_t* data)
{
// flush code here
// let lvgl know that the buffer has been flushed.
lv_flush_ready(disp);
}
while 1 {
delay(5); // delay, sleep, whatever it is you want to use to stall the loop, doesn't matter
lv_tick_inc(5);
lv_task_handler();
}