Multi layer simulation with emWin View

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

  • Multi layer simulation with emWin View

    Hello,

    I'm currently working on an application for a WVGA display, controlled with a LPC1788. I'm currently not owning a controller with display, because before using it I want to show the custommer a design of the GUI. For this reason I'm using the simulator (using Visual C++).
    I found out while working with the GUI I needed to add layers to the design and also found out I needed to use the emWin View application to visualize the application on windows. First thing I did was using the multilayer sample application called MULTILAYER_AlphaChromaMove.
    In my LCD_X_Config function I did the following:

    C Source Code

    1. /*********************************************************************
    2. *
    3. * LCD_X_Config
    4. *
    5. * Purpose:
    6. * Called during the initialization process in order to set up the
    7. * display driver configuration.
    8. */
    9. const short layer_size_x[TOTAL_LAYERS] = { 320, 320, 320};
    10. const short layer_size_y[TOTAL_LAYERS] = { 240, 240, 240};
    11. const short layer_pos_x [TOTAL_LAYERS] = { 0, 0, 0 };
    12. const short layer_pos_y [TOTAL_LAYERS] = { 0, 0, 0 };
    13. const long layer_color_set[TOTAL_LAYERS]= { GUICC_M565, GUICC_8666_1, GUICC_8666_1};
    14. void LCD_X_Config(void) {
    15. const GUI_DEVICE_API * pDriver;
    16. static char i;
    17. #ifndef _WINDOWS
    18. _UpdateDisplayConfig();
    19. #endif
    20. //
    21. // Check framebuffer size
    22. //
    23. #ifndef _WINDOWS
    24. if ((FB_XSIZE * FB_YSIZE) < (VXSIZE_PHYS * VYSIZE_PHYS)) {
    25. while (1); // Error, framebuffer too small
    26. }
    27. #endif
    28. //
    29. // Set display driver and color conversion for 1st layer
    30. //
    31. #ifndef _WINDOWS
    32. if (_Display == DISPLAY_TRULY_240_320) {
    33. pDriver = DISPLAY_DRIVER_TRULY;
    34. } else {
    35. pDriver = DISPLAY_DRIVER_OTHER;
    36. }
    37. #else
    38. pDriver = GUIDRV_WIN32;
    39. #endif
    40. for(i = 0; i < TOTAL_LAYERS; i++)
    41. {
    42. GUI_DEVICE_CreateAndLink(pDriver, layer_color_set[i], 0, i);
    43. //
    44. // Display driver configuration, required for Lin-driver
    45. //
    46. LCD_SetPosEx(i, layer_pos_x[i], layer_pos_y[i]);
    47. LCD_SetSizeEx (i, layer_size_x[i] , layer_size_y[i]);
    48. LCD_SetVSizeEx (i, layer_size_x[i], layer_size_y[i]);
    49. LCD_SetVRAMAddrEx(i, (void*)VRAM_ADDR_VIRT);
    50. }
    51. //
    52. // Set user palette data (only required if no fixed palette is used)
    53. //
    54. #if defined(PALETTE)
    55. LCD_SetLUTEx(0, PALETTE);
    56. #endif
    57. }
    Display All


    and SIM_X_Config

    C Source Code

    1. void SIM_X_Config() {
    2. SIM_GUI_SetCompositeSize(320, 240); // Set size of composite window
    3. SIM_GUI_SetTransColor(0xff0000); // Define the transparent color
    4. }

    when compiling this code with the emWin View application It runs, but the composite window is completely black. It only shows the 3 layers used in the sample.
    After some more searching in the Emwin (5.20) datasheet I found this:
    Currently systems with multiple displays and multiple layers can be used, but not simulated.
    Is this when only using the simulation or also using the Emwin View application? ?(

    Else, could someone help me with finding out what's wrong with my multilayer application?

    Thanks in advance,

    Daan

    Update:

    I also just found out that when clicking in the composite view (which is fully black) at the place of a button, the button makes it 'Click-action' (so the shape changes as usual) in the normal view ( Layer 0).

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

  • Hello Daan,

    emWinView should show every single layer as well as the composite view.

    I did a short test with the MULTILAYER_AlphaChromaMove sample. It works well on my end. I see that your LCD_X_Config() function does not match the one from the sample. Please try using the LCDConf.c which is placed in the sample folder "MULTILAYER_AlphaChromaMove".

    I wrote that you use are going to use a WVGA display, but currently use the simulation for development. Your LCD_X_Config() function shows only QVGA settings. Please ensure to use the same display dimensions in every case.

    Best regards,
    Adrian