Issue with multiple layers ...

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

  • Issue with multiple layers ...

    I am not able to get the multiple layers working. Please see below the setup that I have

    Microcontroller: STM32F439II
    OS: Keil RTX
    Library: Segger GUI that came along with Keil board.
    LCD Driver using : GUIDRV_BITPLAINS

    For enabling the multiple layers, did the following.

    a) Increased the # of layers from 1 to 2.

    #ifndef GUI_NUM_LAYERS
    #define GUI_NUM_LAYERS 2 // Maximum number of available layers
    #endif

    b) Created two lcd drivers, Please see the code below.


    //
    // Set display driver and color conversion for 1st layer
    //
    drv = GUI_DEVICE_CreateAndLink(GUIDRV_BITPLAINS, COLOR_CONVERSION, 0, 0);
    //
    // Display driver configuration, required for Lin-driver
    //
    LCD_SetPosEx (0, 0, 0);
    if (LCD_GetSwapXY()) {
    LCD_SetSizeEx (0, YSIZE_PHYS, XSIZE_PHYS);
    LCD_SetVSizeEx(0, YSIZE_PHYS, XSIZE_PHYS);
    } else {
    LCD_SetSizeEx (0, XSIZE_PHYS, YSIZE_PHYS);
    // LCD_SetVSizeEx(0, XSIZE_PHYS, YSIZE_PHYS);
    }
    //
    // Initialize VRAM access off driver
    //
    LCD_SetVRAMAddrEx(0, (void *)&_VRAM_Desc);
    LCD_SetVisEx (0, 1);


    drv = GUI_DEVICE_CreateAndLink(GUIDRV_BITPLAINS, COLOR_CONVERSION, 0, 1);

    LCD_SetPosEx (1, 128, 240);
    if (LCD_GetSwapXY()) {
    LCD_SetSizeEx (1, YSIZE_PHYS, XSIZE_PHYS);
    LCD_SetVSizeEx(1, YSIZE_PHYS, XSIZE_PHYS);
    } else {
    LCD_SetSizeEx (1, XSIZE_PHYS, YSIZE_PHYS);
    LCD_SetVSizeEx(0, XSIZE_PHYS, YSIZE_PHYS);
    }
    LCD_SetVRAMAddrEx(1, (void *)&_VRAM_Desc1);
    LCD_SetVisEx (1, 1);

    With this I am seeing the following issues:

    a) LCD_GetNumLayers() always returns 1.
    b) When creating second lcd driver for layer 1, it always returns null. Following call.

    drv = GUI_DEVICE_CreateAndLink(GUIDRV_BITPLAINS, COLOR_CONVERSION, 0, 1);

    How can I enable the multiple layers support. Am I missing something.

    Regards,
    Murthy
  • Hello Murphy,

    I am afraid your library was compiled with GUI_NUM_LAYERS == 1. Since there is no option to change this value at runtime, the MultiLayer feature can not be used. I would recommend you to request a library at KEIL which was precompiled defining GUI_NUM_LAYERS with a higher value.

    Best regards,
    Adrian