Bug in mipi_dsi_ek_ra8d1_ep mipi_dsi_ep.c

Hi,

In the example project of mipi_dsi_ek_ra8d1_ep in mipi_dsi_ep.c (github link) on line 327, there is a while loop that keeps waiting as long as the variable g_vsync_flag is true.

Instead, shouldn't it wait as long as g_vsync_flag is equal to false (= RESET_FLAG)?

This variable is then later set to true when there has been a DISPLAY_EVENT_LINE_DETECTION in glcdc_callback. Also, the while loop would be stopped immediately because you set the variable g_vsync_flag to false just above it.

So change

/* Wait for a Vsync event */
g_vsync_flag = RESET_FLAG;
while (g_vsync_flag);

to

/* Wait for a Vsync event */
g_vsync_flag = RESET_FLAG;
while (g_vsync_flag == RESET_FLAG);

Kind regards

ND

Parents Reply Children
No Data