FTDI Community

Please login or register.

Login with username, password and session length.
Advanced Search  

News:

Welcome to the FTDI Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ FTDI Support


New Bridgetek Community is now open

Please note that we have created the Bridgetek Community to discuss all Bridgetek products e.g. EVE, MCU.

Please follow this link and create a new user account to get started.

Bridgetek Community

Show Posts

You can view here all posts made by this member. Note that you can only see posts made in areas to which you currently have access.

Messages - dnpark

Pages: [1]
1
Discussion - Software / Re: Basic Question - Image overlap
« on: September 04, 2020, 01:06:59 AM »
This is a testing code.
Please , check the code.

And, LCD screen is changed for a short time.
I think that the if RAM_G is updating, than LCD screen is changed .
Is there a command (methods) on the LCD to lock or stop the output while modifying the RAM_G data?

Thanks you.

#define Handle_BG     0
#define Handle_Small  1

void Image_Test_2(Gpu_Hal_Context_t *phost)
{
    uint8_t *p;
    uint32_t imgID;
    uint32_t imgFormat, imgSize, sizeX, sizeY, posX, posY;
   
    // Large Image  ------------------------------------------------------------
    p = (uint8_t *)Large_Image;
    imgFormat = RGB565;
    imgSize = 52804;
    sizeX = 480;
    sizeY = 272;
    posX = 0;
    posY = 0;
   
    /* Load Compressed Image */
    Gpu_CoCmd_Inflate(phost, 0); 
    Gpu_Hal_WrCmdBufFromFlash(phost, p, imgSize);
 
    //
    Gpu_CoCmd_Dlstart(phost);
    App_WrCoCmd_Buffer(phost, CLEAR_TAG(1));
    App_WrCoCmd_Buffer(phost, CLEAR_COLOR_RGB(255,255,255));
    App_WrCoCmd_Buffer(phost, CLEAR(1, 1, 1));
       
//    App_WrCoCmd_Buffer(phost, COLOR_A(255));
//    App_WrCoCmd_Buffer(phost, COLOR_RGB(255,255,255));
//    App_WrCoCmd_Buffer(phost, BITMAP_HANDLE(Handle_BG));

    App_WrCoCmd_Buffer(phost,BITMAP_SOURCE(0));
    App_WrCoCmd_Buffer(phost,BITMAP_LAYOUT(imgFormat, (sizeX*2), sizeY));
    App_WrCoCmd_Buffer(phost,BITMAP_SIZE(NEAREST, BORDER, BORDER, sizeX, sizeY));   

    App_WrCoCmd_Buffer(phost,BEGIN(BITMAPS));
//    App_WrCoCmd_Buffer(phost, BITMAP_HANDLE(Handle_BG));
    App_WrCoCmd_Buffer(phost,VERTEX2F(posX<<4 , posY<<4));  // (posX * 16, posY * 16)

    //Start drawing bitmap
    App_WrCoCmd_Buffer(phost, END());
    App_WrCoCmd_Buffer(phost, RESTORE_CONTEXT());
    App_WrCoCmd_Buffer(phost, DISPLAY());
    Gpu_CoCmd_Swap(phost);
    App_Flush_Co_Buffer(phost);
    Gpu_Hal_WaitCmdfifo_empty(phost);
   
    // for Test
    HAL_Delay(1000);
   
    // Samll Image  ------------------------------------------------------------
    p = (uint8_t *)Samll_Image;
    imgFormat = ARGB4;
    imgSize = 6703;
    sizeX = 264;
    sizeY = 80;
    posX = 100;
    posY = 100;
   
    /* Load Compressed Image */
    Gpu_CoCmd_Inflate(phost, 0); 
    Gpu_Hal_WrCmdBufFromFlash(phost, p, imgSize);
 
    //
    Gpu_CoCmd_Dlstart(phost);
   
    App_WrCoCmd_Buffer(phost,SCISSOR_XY( posX, posY));
   App_WrCoCmd_Buffer(phost,SCISSOR_SIZE(sizeX,sizeY));
   
    App_WrCoCmd_Buffer(phost, CLEAR(1, 1, 1));
    App_WrCoCmd_Buffer(phost, CLEAR_TAG(1));
    App_WrCoCmd_Buffer(phost, CLEAR_COLOR_RGB(255,255,255));
       
    App_WrCoCmd_Buffer(phost, COLOR_A(255));
    App_WrCoCmd_Buffer(phost, COLOR_RGB(255,255,255));
    App_WrCoCmd_Buffer(phost, BITMAP_HANDLE(Handle_Small));

    App_WrCoCmd_Buffer(phost,BITMAP_SOURCE(0));
    App_WrCoCmd_Buffer(phost,BITMAP_LAYOUT(imgFormat, (sizeX*2), sizeY));
    App_WrCoCmd_Buffer(phost,BITMAP_SIZE(NEAREST, BORDER, BORDER, sizeX, sizeY));   

    App_WrCoCmd_Buffer(phost,BEGIN(BITMAPS));
 //   App_WrCoCmd_Buffer(phost, BITMAP_HANDLE(Handle_Small));
    App_WrCoCmd_Buffer(phost,VERTEX2F(posX<<4 , posY<<4));  // (posX * 16, posY * 16)

    //Start drawing bitmap
    App_WrCoCmd_Buffer(phost, END());
    App_WrCoCmd_Buffer(phost, RESTORE_CONTEXT());
    App_WrCoCmd_Buffer(phost, DISPLAY());
    Gpu_CoCmd_Swap(phost);
    App_Flush_Co_Buffer(phost);
    Gpu_Hal_WaitCmdfifo_empty(phost);
}

2
Discussion - Software / Re: Basic Question - Image overlap
« on: September 02, 2020, 04:00:21 PM »
Hello,

I am testing by writing data directly to RAM_G without using a specific library.
The image is stored in the internal Flash of the MCU (ST32F413), so I don't use SDCARD.
I convert image using the EVE Asset Builder. There are 3 background images (480x272) and about 20 small images.
I check many kinds of libraries and sample codes, but I didn't understand them exactly because they had many functions.

The function is simple, such as displaying background images, displaying some small images, and changing small images by touch input.
1. Display Background
2. Delay
3. Add small images on the background.
4. Wait touch input
5. clear samll image.
6. Repeat
Currently, background images are implemented by writing data directly to RAM_G, but there is a problem with background images being erased when small images are displayed on background images.

If possible, please let me know the Display List with this function.

Thank you .

3
Discussion - Software / Basic Question - Image overlap
« on: August 31, 2020, 04:20:47 PM »
Hi !
I am using FT800 for the first time.
The LCD has a resolution of 480x272. MCU uses STM32F .
I use background image (480x272) and  several small images (140x140 size).
If touch is detected, smallimage is displayed on background image.
I wrote data directly to RAM_G and displayed , but small images is nor correctly displayed.
I have tried various ways, but I have not solved the problem .

How can I display small image on the background image !

Pages: [1]