How to change display orientation while system is running?

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • How to change display orientation while system is running?

    Dear Segger Support Team

    I'm using emWin 5.22 and I have to give my users the opportunity to turn the display orientation during runtime.
    Setting the orientation in LCDConf.c with GUIDRV_FlexColor_Config(pDevice, &Config);
    works fine during boot up.
    However, it doesn't has any effect if I'm doing this during runtime.

    From other threads in this forum I learned that using GUI_SetOrientation() is the wrong way.

    So, what is the prefered way to change the orientation during runtime?

    Thank you in advance

    Benjamin
  • Hallo Benjamin,

    there are 2 diverent ways to change the display orientation:
    1. Using GUI_SetOrientation()
    2. Driver based configuration of the desired orientation

    The second means that you create for each orientation a different layer with the desired orientation.
    Please refer to the chapter 24 "MultiLayer / MultiDisplay support" -> "Using MultiDisplay support" -> "Run-time screen rotation" in the emWin user manual.

    If your hardware supports layers then using different driver based configurations should be the preferred way to implement changing the display orientation at run-time. Otherwise the function GUI_SetOrientation() can be used.

    Best regards
    Thorsten