cancel
Showing results for 
Search instead for 
Did you mean: 

Touch GFX Two Layers frame buffer update issue

MSale.1
Senior

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;
}

0 REPLIES 0