LCD_X_DisplayDriver() return value not reflected by GUI_Init()

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

    • LCD_X_DisplayDriver() return value not reflected by GUI_Init()

      Hi,

      we are using emWin library, obtained from ST, version 540 (STemWin540_CM4_OS_GCC). Our processor is STM32L471. Have to say that emWin lib is a very useful, saved a LOT of time to us, thank you guys! :thumbup:

      Everything works fine, but we would like to improve robustness of our firmware by adding some diagnostic of display status - during initialization of display as well as during runtime.
      So we have implemented some diagnostics into hardware initialization of display (with controller ILI9341, which has some self diag commands), and we would like to pass possible error of this diagnostic to upper layers of our firmware. Problem is, that if LCD_X_DisplayDriver() returns negative value (cmd == LCD_X_INITCONTROLLER), e.g. -2, function GUI_Init() always returns 0. We were not able to get non zero return value from GUI_Init() call using return value of LCD_X_DisplayDriver(). So does anybody has an idea how to pass error from LCD_X_DisplayDriver() to GUI_Init()?

      Thank you in advance for any comments.

      Jan
    • Thanks for your reply golf2109

      If I'm not wrong, when I call GUI_Init(), this function calls LCD_X_DisplayDriver() (multiple times with different cmds: LCD_X_INITCONTROLLER, LCD_X_SETORG, LCD_X_ON). I'd like to pass return code from LCD_X_DisplayDriver() as a return code from GUI_Init() function. Calling LCD_X_DisplayDriver() directly doesn't seem correct, as it is already called by GUI_Init().