Upgrade from Stm32.emWin to Segger.emWin because of DisplayOrientation

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

  • Upgrade from Stm32.emWin to Segger.emWin because of DisplayOrientation

    Hello,

    so far we have used the free emWin Gui Lib from Segger provided with the STM32 toolkit.

    Now we have another display which requires mirroring and we observed that there are various problems with screen mirroring using the free lib. So we are planning to buy a license for the original Segger library. Before doing this we'd like to know

    a) Is the original Segger library compatible with the free stm32 library? (Especially regarding the layer initialization and display hal adaption)
    b) Are the problems of the free lib regarding orientation change known to segger and are they solved in the full version of the lib?

    Many thanks.

    PS:
    For the STM-Free-GUiLib we found following problems: We changed orientation by using another GUIDRV_XX object we observed that it is not predictable wether orientation for Rectangles and lines is done or not. It seems to depend on the coordinates. So it's hard to find a workaround.

    The post was edited 2 times, last by halstoy ().

  • Problem is in example code from the GUILib_HelloWorld project.

    The problem seems to be not in segger gui lib code but in the sample code provided by ?stm/segger?:

    in the LCD_X_Config func i removed (comment) the line where the pointer to the custom FillRect func is set:

    C Source Code

    1. /* Filling via DMA2D does only work with 16bpp or more */
    2. if (LCD_LL_GetPixelformat(i) <= LTDC_PIXEL_FORMAT_ARGB4444)
    3. {
    4. //LCD_SetDevFunc(i, LCD_DEVFUNC_FILLRECT, (void(*)(void))CUSTOM_FillRect);
    5. LCD_SetDevFunc(i, LCD_DEVFUNC_DRAWBMP_8BPP, (void(*)(void))LCD_DrawBitmap8bpp);
    6. }
    7. /* Set up drawing routine for 16bpp bitmap using DMA2D */
    8. if (LCD_LL_GetPixelformat(i) == LTDC_PIXEL_FORMAT_RGB565) {
    9. LCD_SetDevFunc(i, LCD_DEVFUNC_DRAWBMP_16BPP, (void(*)(void))LCD_DrawBitmap16bpp); /* Set up drawing routine for 16bpp bitmap using DMA2D. Makes only sense with RGB565 */
    10. }
    Display All


    With this it works. I get proper mirrorY results. BUT: If i reinit the display at runtime to use default driver and then switch back to mirrory driver i still get some objects drawn without mirror.
    Still need to investigate to switch this at runtime. And maybe correct the CUSTOM_FillRect to use hw acceleration again. (Which should be disabled by removing the source line above)

    The post was edited 4 times, last by halstoy ().