[Question]How to control the disp_flush row is even?

HI, Sirs:

  I have a special LCD that **switched the odd and even rows,**
  Normal LCD update rows:     0>1>2>3>4>5>6>7
  May LCD update rows:         1>0>3>2>5>4>7>6

  To normal display I try to switch odd and even row data in "my_disp_flush" function, before flash lcd.
  But sometimes the "lv_area_t *area" update rows is odd then I can not do the odd&even rows switch.

  **May I know how to control the "lv_area_t *area" always is even rows?**

  void my_disp_flush(lv_disp_drv_t *disp, const lv_area_t *area, lv_color_t *color_p)
       uint32_t w = (area->x2 - area->x1 + 1);
       uint32_t h = (area->y2 - area->y1 + 1);
       **How to control the "h" always is even?**


You can use the round_cb

  • rounder_cb Round the coordinates of areas to redraw. E.g. a 2x2 px can be converted to 2x8. It can be used if the display controller can refresh only areas with specific height or width (usually 8 px height with monochrome displays).

On that same page you will find my_rounder_cb as an example.