2025-09-11 7:25 AM
Hello i'm using touch GFX with STM32H7RS-DK And i need to evaluate for a future product if display rotation is possible.
I tried this implementation but drawCacheEnabled isn't reconize by software so i removed it and the widget is working but the screen flicker betwen 0 and 180° . Is there a more actual way of rotate a screen .
// Force redrawing entire screen
virtual void draw(Rect& rect)
{
if (drawCacheEnabled)
{
// Invalidate entire screen instead of requested rect.
Rect r(0, 0, HAL::DISPLAY_WIDTH, HAL::DISPLAY_HEIGHT);
Application::draw(r);
}
else
{
// Use original rect if we are *actually* drawing and not just invalidating.
Application::draw(rect);
}
}
Thanks
2025-09-11 7:58 AM
Hello @Hamady,
We do not support 180 rotation, usually for a product, the whole screen itself is rotated. Also some screen support rotation by setting some bits.
It's possible to achieve rotation, by rotating a copy of the framebuffer that you then send to the screen. You can use the GPU to do that with better performances.
May I ask, how did you come up with this code, I dont see how you can have a rotation with just that ?
BR,