New callback to suspend LVGL during active waiting loop

When a new internal buffer (VDB) must be sent to the display, the flush_cb callback is called.
Then user has to call lv_disp_flush_ready() when transfer is finished.

Internally, there are some cases where LVGL waits for the end of buffer transmission.

This wait is implemented as an active wait:

while(vdb->flushing);

The feature request is to add a new callback that would be called by LVGL just before entering these waiting loops allowing the user to suspend the execution of LVGL task (when LVGL is used with an OS).

So, we would have the following sequencing:

  1. A new VDB is ready
  2. LVGL calls flush_cb
  3. Buffer transmission is started
  4. LVGL continues to render next buffer (dual buffer)
  5. LVGL has finished to render the second buffer
  6. Before entering the wait loop, LVGL call this new callback
  7. Within this callback LVGL execution is suspended
  8. Buffer transmission finishes
  9. LVGL execution is resumed
  10. lv_disp_flush_ready() is called

wait_cb can be used in 7.x for this purpose: https://github.com/lvgl/lvgl/blob/039080fc261176dc958a62cb8e8a1e162116f444/src/lv_core/lv_refr.c#L488-L490

Keep in mind that if the OS takes too long to resume the LVGL thread (e.g. a low tick rate), the performance will be worse than a busy wait, because rendering will be delayed by the inability to quickly switch between threads.