I want to use a double buffer with an RGB parallel interface
Thank you for your help.
I'm a beginner.
The following function is called by the line interrupt, but swapFrameBuffers () seems to be empty.
Specifically, what kind of code should I write?
What should I refer to and how should I switch between the two addresses?
Is there any good example?
Thank you.
void HAL_LTDC_LineEventCallback (LTDC_HandleTypeDef * hltdc)
{
if (LTDC-> LIPCR == lcd_int_active_line)
{
// entering active area
HAL_LTDC_ProgramLineEvent (hltdc, lcd_int_porch_line);
HAL :: getInstance ()-> vSync ();
OSWrappers :: signalVSync ();
// Swap frame buffers immediately instead of waiting for the task to be scheduled in.
// Note: task will also swap when it wakes up, but that operation is guarded and will not have
// any effect if already swapped.
HAL :: getInstance ()-> swapFrameBuffers ();
GPIO :: set (GPIO :: VSYNC_FREQ);
}
else else
{
// exiting active area
HAL_LTDC_ProgramLineEvent (hltdc, lcd_int_active_line);
GPIO :: clear (GPIO :: VSYNC_FREQ);
HAL :: getInstance ()-> frontPorchEntered ();
}
}