Fix TouchGFX again
This commit is contained in:
@ -19,6 +19,7 @@
|
||||
#include <TouchGFXGeneratedHAL.hpp>
|
||||
#include <touchgfx/hal/OSWrappers.hpp>
|
||||
#include <gui/common/FrontendHeap.hpp>
|
||||
#include <touchgfx/hal/GPIO.hpp>
|
||||
#include <touchgfx/hal/PaintImpl.hpp>
|
||||
#include <touchgfx/hal/PaintRGB565Impl.hpp>
|
||||
|
||||
@ -37,7 +38,7 @@ void TouchGFXGeneratedHAL::initialize()
|
||||
{
|
||||
HAL::initialize();
|
||||
registerEventListener(*(Application::getInstance()));
|
||||
setFrameBufferStartAddresses((void*)0x24040000, (void*)0x24040000, (void*)0);
|
||||
setFrameBufferStartAddresses((void*)0x24040000, (void*)0x240A0000, (void*)0);
|
||||
}
|
||||
|
||||
void TouchGFXGeneratedHAL::configureInterrupts()
|
||||
@ -123,4 +124,37 @@ void TouchGFXGeneratedHAL::FlushCache()
|
||||
}
|
||||
}
|
||||
|
||||
extern "C"
|
||||
{
|
||||
void HAL_LTDC_LineEventCallback(LTDC_HandleTypeDef* hltdc)
|
||||
{
|
||||
if (!HAL::getInstance())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
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
|
||||
{
|
||||
//exiting active area
|
||||
HAL_LTDC_ProgramLineEvent(hltdc, lcd_int_active_line);
|
||||
|
||||
// Signal to the framework that display update has finished.
|
||||
HAL::getInstance()->frontPorchEntered();
|
||||
GPIO::clear(GPIO::VSYNC_FREQ);
|
||||
}
|
||||
}
|
||||
}
|
||||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
||||
|
||||
Reference in New Issue
Block a user