cancel
Showing results for 
Search instead for 
Did you mean: 

LTDC Rotation 180 degres

Hamady
Associate III

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

11 REPLIES 11
Hamady
Associate III

Hi, 

A big thanks for you hard work ,

Is there a toogle in the code to rotate the screen with user interaction (to show the rotation )

Thanks !!!

LouisB
ST Employee

Hello @Hamady,

You are welcome, the project doesn't contain such a button, but it's implementation will mainly consist of a bypassing all the additional code (as rotations can be done in realtime). If the project answers your question, please mark it as best answer so other users can access it easily.

BR,

Louis BOUDO
ST Software Engineer | TouchGFX