GUIDRV_Lin examples

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

  • GUIDRV_Lin examples

    Where can I find some example of how to use GUIDRV_Lin driver?

    I use STM32F412 with STemWin. I want to make STemWin handle only one framebuffer in ram. then I will transfer the contents of the framebuffer to the LCD.

    I have this:

    C Source Code

    1. #define XSIZE_PHYS 128
    2. #define YSIZE_PHYS 160
    3. uint16_t frameBuffer[XSIZE_PHYS*YSIZE_PHYS] __attribute__ ((aligned (16)));
    4. void LCD_X_Config(void)
    5. {
    6. //
    7. // Set display driver and color conversion
    8. //
    9. GUI_DEVICE_CreateAndLink(GUIDRV_LIN_16, // Display driver
    10. GUICC_M565, // Color conversion
    11. 0, 0);
    12. //
    13. // Display driver configuration
    14. //
    15. LCD_SetSizeEx (0, XSIZE_PHYS, YSIZE_PHYS); // Physical display size in pixels
    16. LCD_SetVSizeEx (0, XSIZE_PHYS, YSIZE_PHYS); // Virtual display size in pixels
    17. LCD_SetVRAMAddrEx(0, (void *)frameBuffer); // Video RAM start address
    18. }
    Display All


    C Source Code

    1. void main(void)
    2. {
    3. GUI_Init();
    4. GUI_SetColor(GUI_RED);
    5. const GUI_POINT aPoints[] = {
    6. { 0, 0},
    7. { 0, 159},
    8. { 127, 159},
    9. { 127, 0},
    10. };
    11. GUI_DrawPolygon(aPoints, 4, 0,0);
    12. }
    Display All



    after call to GUI_DrawPolygon() I check framebuffer conetent with debugger, and all is 0x00. It seems that the library has not modified the contents of the framebuffer.

    Where am I wrong? what is missing in initialization? Should I set some functions for LCD_DEVFUNCBUFFER and/or LCD_DEVFUNCRECT and/or LCD_DEVFUNC_FILLRECT?

    best regards
    Max
  • Hi,

    You might use the LCDConf.c coming from ST or the one attached as a reference.

    The ones of ST can be found in the STM32Cube packages in the project folder of a specific board. Like this one for the STM32F746-Discovery board:
    \Projects\STM32746G-Discovery\Applications\STemWin\STemWin_HelloWorld\Src\LCDConf.c

    Attached are two, one for a STM32F7xx and one for an STM32F4xx.

    Regards
    Sven
    Files
    • LCDConf.zip

      (40.86 kB, downloaded 539 times, last: )
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.