Abrupt Behaviour after Enabling MEMDEV on EmWin

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

  • Abrupt Behaviour after Enabling MEMDEV on EmWin

    Hi, I have emWin 5.22 Version my Existing UI works fine without Memdev, but after enabling Memdev, even if I don't use any of MEMDEV functionality, my existing Functionalities start Breaking, some Windows (WM) are not completely drawn etc...

    I Have to repaint every time to get the changes on the Screen...
    This following code is from segger samples source code MEMDEV_Banding.c. Please consider line no. 16 and 17, how can I avoid these lines..

    C Source Code

    1. #define USE_BANDING_MEMDEV (1) /* Set to 0 for drawing without banding memory device */
    2. ......
    3. .....
    4. .....
    5. static void _DemoBandingMemdev(void)
    6. {
    7. .....................
    8. GUI_RotatePolygon(DrawItContext.aPointsDest, aPoints,
    9. SIZE_OF_ARRAY(aPoints), angle);
    10. #if USE_BANDING_MEMDEV
    11. {
    12. GUI_RECT Rect = {50, 70, 350, 270};
    13. /* Use banding memory device for drawing */
    14. GUI_MEMDEV_Draw(&Rect, &_DrawIt, &DrawItContext, 0, 0);
    15. WM_InvalidateRect(WM_HBKWIN, &Rect); // Always have to add this Line to see the Changes reflect on my Screen
    16. GUI_Delay(1000);
    17. }
    18. #else
    19. /* Simple drawing without using memory devices */
    20. _DrawIt((void *) &DrawItContext);
    21. #endif
    22. }
    23. }
    24. }
    25. void banding(myWgdtHnd_t hHndl)
    26. {
    27. myViewHandle hViewhndl;
    28. hViewhndl = (myViewHandle) hHndl;
    29. if(NULL != hViewhndl)
    30. {
    31. GUI_MEMDEV_Select(hViewhndl->hmem);
    32. GUI_SetBkColor(GUI_GREEN);
    33. _DemoBandingMemdev();
    34. GUI_MEMDEV_Select(0);
    35. //GUI_MEMDEV_CopyToLCD(hViewhndl->hmem);
    36. }
    37. }
    Display All


    Also tried using GUI_Exec(), but didnt get the Desired output..
    I Wanted to know what all changes need to be taken care of, if MEMDEV is enabled. What modification i need to do so that my existing functionalities do not break.....

    Thank you..

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

  • Memdev Fade In/Out Help

    Thank you for your Response Adrian...

    I have one more query for the MEMDEV fade In/out effect, while i am calling GUI_MEMDEV_FadeInWIndow(WM_HWIN, int), I am unable to see the gradual fading out window, instead after the specified period, the window disappears suddenly.. Please Can you suggest where I am missing out.