Product Application

©
Rev.1.1
{
/* Display the sketch */
Ft_Gpu_CoCmd_Dlstart(phost);
Ft_App_WrCoCmd_Buffer(phost,CLEAR_COLOR_RGB(0x00,0x00,0xff));
Ft_App_WrCoCmd_Buffer(phost,CLEAR(1,1,1));
Ft_App_WrCoCmd_Buffer(phost,COLOR_RGB(0xff,0xff,0xff));
Ft_App_WrCoCmd_Buffer(phost,SCISSOR_SIZE(FT_DispWidth,(FT_DispHeight -
BorderSz)));
Ft_App_WrCoCmd_Buffer(phost,SCISSOR_XY(0,BorderSz));
Ft_App_WrCoCmd_Buffer(phost,CLEAR_COLOR_RGB(0xe0,0xe0,0xe0));
Ft_App_WrCoCmd_Buffer(phost,CLEAR(1,1,1));
Ft_App_WrCoCmd_Buffer(phost,COLOR_RGB(0xff,0xff,0xff));
Ft_App_WrCoCmd_Buffer(phost,SCISSOR_SIZE((FT_DispWidth -
2*BorderSz2),(FT_DispHeight - BorderSz - BorderSz2)));
Ft_App_WrCoCmd_Buffer(phost,SCISSOR_XY(BorderSz2,BorderSz));
Ft_App_WrCoCmd_Buffer(phost,CLEAR_COLOR_RGB(0xff,0xff,0xff));
Ft_App_WrCoCmd_Buffer(phost,CLEAR(1,1,1));
Ft_App_WrCoCmd_Buffer(phost,SCISSOR_SIZE(512,512));
Ft_App_WrCoCmd_Buffer(phost,SCISSOR_XY(0,0));
Ft_App_WrCoCmd_Buffer(phost,COLOR_RGB(0,0,0));
/* L8 bitmap display */
Ft_App_WrCoCmd_Buffer(phost,BEGIN(BITMAPS));
Ft_App_WrCoCmd_Buffer(phost,BITMAP_SOURCE((RAM_G+ending_address)));//0));
Ft_App_WrCoCmd_Buffer(phost,BITMAP_LAYOUT(L8,(FT_DispWidth -
2*BorderSz2),(FT_DispHeight - BorderSz - BorderSz2)));
Ft_App_WrCoCmd_Buffer(phost,BITMAP_SIZE(BILINEAR,BORDER,BORDER,(FT_DispWidth
- 2*BorderSz2),(FT_DispHeight - BorderSz - BorderSz2)));
Ft_App_WrCoCmd_Buffer(phost,VERTEX2F(BorderSz2*16,BorderSz*16));
Ft_App_WrCoCmd_Buffer(phost,END());
/* Display the text */
Ft_App_WrCoCmd_Buffer(phost,COLOR_RGB(0xff,0xff,0xff));
Ft_Gpu_CoCmd_Text(phost,(FT_DispWidth/2), 20, 27, OPT_CENTER, "Draw test");
Ft_App_WrCoCmd_Buffer(phost,COLOR_RGB(0xff,0x00,0x00));
StringArray[0] = '\0';
strcat(StringArray,"Next demo in ");
Ft_Gpu_Hal_Dec2Ascii(StringArray,(ThisDemoEnd/100)+1);
strcat(StringArray,"s");
Ft_Gpu_CoCmd_Text(phost,FT_DispWidth, (FT_DispHeight-12), 20, OPT_RIGHTX,
StringArray);
if(tftConfig == RTP35 || tftConfig == RTP43 || tftConfig == CTP35 ||
tftConfig == CTP43)
{
Ft_App_WrCoCmd_Buffer(phost,COLOR_RGB(0xff,0xff,0xff));
Ft_App_WrCoCmd_Buffer(phost,TAG(249));
Ft_Gpu_CoCmd_Button(phost,FT_DispWidth-65,FT_DispHeight-42,60,30,20,0,
"SKIP->");
CurrTag2 = Ft_Gpu_Hal_Rd8(phost,REG_TOUCH_TAG);
Ft_App_WrCoCmd_Buffer(phost,TAG(250));
Ft_Gpu_CoCmd_Button(phost,FT_DispWidth-65,12,60,30,20,0, "CLEAR");
CurrTag3 = Ft_Gpu_Hal_Rd8(phost,REG_TOUCH_TAG);
if(CurrTag3==250)
{
Ft_Gpu_CoCmd_MemZero(phost, (RAM_G+ending_address),MemZeroSz);//Clear
memory
CurrTag3=0;
}
}
Ft_App_WrCoCmd_Buffer(phost,DISPLAY());
Ft_Gpu_CoCmd_Swap(phost);
/* Download the commands into fifo */
Ft_App_Flush_Co_Buffer(phost);
/* Wait till coprocessor completes the operation */
Ft_Gpu_Hal_WaitCmdfifo_empty(phost);