I'm attempting to use the emWin function GUI_BMP_DrawEx() to draw a .bmp image stored in external Flash onto a window. I've also implemented a getData() function as shown in the examples.
If I try to draw an image onto the background window using GUI_BMP_DrawEx() everything works as expected. The getData function gets accessed several times and the image is correctly displayed.
However, if I try to call the same function from within the WM_PAINT case in a window's callback function, it will go in the getData() function and read the first 54 bytes as expected, but when it goes back in to getData() the second time the Offset is not 54 but rather some random value. The program then continues to use the getData() function to read from flash but the offset value is always different and random. It never returns from GUI_BMP_DrawEx().
Strangely, if I call GUI_BMP_DrawEx() from the WM_INIT case, the function will call getData() once and then return immediately. In either case the images do not get displayed.
I don't understand this behavior. Any help would be greatly appreciated.
You should contact Segger for this query ,as they provide the API's with the Library.
You can get help at this link -