2023-08-24 04:42 AM
Hi,
In TouchGFXGeneratedHAL.CPP u are using the HAL_LTDC_LineEventCallback. the issue is i use the two layers.
Layer_1 for live video from camera and layer_2 for GUI. every time i generate code i must add this code below. the added code in bold,italic. is there any way to make it more automatic or u know other way around?
uint16_t* TouchGFXGeneratedHAL::getTFTFrameBuffer() const
{
return (uint16_t*)LTDC_Layer2->CFBAR;
}
void TouchGFXGeneratedHAL::setTFTFrameBuffer(uint16_t* adr)
{
LTDC_Layer2->CFBAR = (uint32_t)adr;
LTDC_Layer1->CFBAR = (uint32_t)activeBuffer;
/* Reload immediate */
LTDC->SRCR = (uint32_t)LTDC_SRCR_IMR;
}