Product Application

©
Rev.1.1
CurrTextIdx++;
/* clear all the charaters after 24 are pressed */
if(CurrTextIdx > 24)
{
CurrTextIdx = 0;
}
}
Ft_Gpu_CoCmd_Dlstart(phost);
Ft_App_WrCoCmd_Buffer(phost,CLEAR_COLOR_RGB(64,64,64));
Ft_App_WrCoCmd_Buffer(phost,CLEAR(1,1,1));
Ft_App_WrCoCmd_Buffer(phost,COLOR_RGB(0xff,0xff,0xff));
/* Draw text entered by user */
/* make sure the array is a string */
DispText[CurrTextIdx] = CurrChar;
DispText[CurrTextIdx + 1] = '\0';
Ft_App_WrCoCmd_Buffer(phost,TAG_MASK(0));
Ft_Gpu_CoCmd_Text(phost,FT_DispWidth/2, 40, TextFont, OPT_CENTER,
DispText);//text info
Ft_App_WrCoCmd_Buffer(phost,TAG_MASK(1));
yOffset = 80 + 10;
/* Construct a simple keyboard - note that the tags associated with the keys
are the character values given in the arguments */
Ft_Gpu_CoCmd_FgColor(phost,0x404080);
Ft_Gpu_CoCmd_GradColor(phost,0x00ff00);
Ft_Gpu_CoCmd_Keys(phost, yBtnDst, yOffset, 10*ButtonW, ButtonH, TextFont,
(OPT_CENTER | CurrTag), "qwertyuiop");
Ft_Gpu_CoCmd_GradColor(phost,0x00ffff);
yOffset += ButtonH + yBtnDst;
Ft_Gpu_CoCmd_Keys(phost, yBtnDst, yOffset, 10*ButtonW, ButtonH, TextFont,
(OPT_CENTER | CurrTag), "asdfghjkl");
Ft_Gpu_CoCmd_GradColor(phost,0xffff00);
yOffset += ButtonH + yBtnDst;
Ft_Gpu_CoCmd_Keys(phost, yBtnDst, yOffset, 10*ButtonW, ButtonH, TextFont,
(OPT_CENTER | CurrTag), "zxcvbnm");//hilight button z
yOffset += ButtonH + yBtnDst;
Ft_App_WrCoCmd_Buffer(phost,TAG(' '));
if(' ' == CurrTag)
{
Ft_Gpu_CoCmd_Button(phost,yBtnDst, yOffset, 10*ButtonW, ButtonH, TextFont,
OPT_CENTER | OPT_FLAT, " ");//mandatory to give '\0' at the end to make sure
coprocessor understands the string end
}
else
{
Ft_Gpu_CoCmd_Button(phost,yBtnDst, yOffset, 10*ButtonW, ButtonH, TextFont,
OPT_CENTER, " ");//mandatory to give '\0' at the end to make sure coprocessor
understands the string end
}
yOffset = 80 + 10;
Ft_Gpu_CoCmd_Keys(phost, 11*ButtonW, yOffset, 3*ButtonW, ButtonH, TextFont, (0
| CurrTag), "789");
yOffset += ButtonH + yBtnDst;
Ft_Gpu_CoCmd_Keys(phost, 11*ButtonW, yOffset, 3*ButtonW, ButtonH, TextFont, (0
| CurrTag), "456");
yOffset += ButtonH + yBtnDst;
Ft_Gpu_CoCmd_Keys(phost, 11*ButtonW, yOffset, 3*ButtonW, ButtonH, TextFont, (0
| CurrTag), "123");
yOffset += ButtonH + yBtnDst;
Ft_App_WrCoCmd_Buffer(phost,COLOR_A(255));
Ft_Gpu_CoCmd_Keys(phost, 11*ButtonW, yOffset, 3*ButtonW, ButtonH, TextFont, (0
| CurrTag), "0.");//hilight button 0
Ft_App_WrCoCmd_Buffer(phost,COLOR_RGB(0xff,0x00,0x00));
StringArray[0] = '\0';
strcat(StringArray,"Next demo in ");