General Category > Discussion - Software

Partial screen update with FT813

(1/1)

techtoys:
Hi

Is there any method to do a partial update to LCD screen driven by FT813?
Testing with Msvc_Emulator with a very simple feature. Code snippet is shown below:


--- Code: ---//Display list to draw something at the top
Gpu_CoCmd_Dlstart(phost);
FuncA_display_object(); //function to display something on top of the screen
App_WrCoCmd_Buffer(phost, END());
App_WrCoCmd_Buffer(phost, DISPLAY());
Gpu_CoCmd_Swap(phost);
App_Flush_Co_Buffer(phost);
Gpu_Hal_WaitCmdfifo_empty(phost);

//2nd display list to draw some other contents a the bottom.
Gpu_CoCmd_Dlstart(phost);
App_WrCoCmd_Buffer(phost, SCISSOR_XY((DispWidth / 2) - 14, (DispHeight - 75)));
App_WrCoCmd_Buffer(phost, SCISSOR_SIZE(32, 32));
App_WrCoCmd_Buffer(phost, CLEAR_COLOR_RGB(255,255, 1));
App_WrCoCmd_Buffer(phost, CLEAR(1, 1, 1));
FuncB_display_object(); //function to display other contents at the bottom of the screen
App_WrCoCmd_Buffer(phost, END());
App_WrCoCmd_Buffer(phost, DISPLAY());
Gpu_CoCmd_Swap(phost);
App_Flush_Co_Buffer(phost);
Gpu_Hal_WaitCmdfifo_empty(phost);

--- End code ---

The mindset to run FuncA_display_object() and FuncB_display_object() within a single display list with one swap is not allowed for my case. With code above I can see only the bottom content because the second display list is refreshing the whole screen. I did try to use scissor but this macro only restrict the area to draw in the second display list, the rest of the area including the top part has been erased completely.

Is it something related to SAVE_CONTEXT() & RESTORE_CONTEXT()? and Can somebody help in this ?

Thanks in advance.

John

FTDI Community:
Hello,

Please have a look at the following Application Note:
https://brtchip.com/wp-content/uploads/Support/Documentation/Application_Notes/ICs/EVE/AN_340_FT800_Optimising-screen-updates-with-Macro-and-Append.pdf

The methods described in this should be helpful for you.

Best Regards,
FTDI Community

Navigation

[0] Message Index

Go to full version