/********************************************************************
* 名称 : PutGB1616()
* 功能 : 在x,y位置写16*16点阵的汉字
* 输入 : unsigned short x, unsigned short y, unsigned char c[2], unsigned int fColor,unsigned int bColor
* x列 y行 汉字字符 前景色 背景色
* 输出 : 无
***********************************************************************/
void LCD_PutGB1616(unsigned short x, unsigned short y, unsigned char c[2], unsigned int fColor,unsigned int bColor)
{
unsigned int i,j,k;
LCD_SetArea(x, x+16-1,y, y+16-1);
for (k=0;k<110;k++)
{ //110表示自建汉字库中的个数,循环查询内码
if ((codeGB_16[k].Index[0]==c[0])&&(codeGB_16[k].Index[1]==c[1]))
{
for(i=0;i<32;i++)
{
unsigned short m=codeGB_16[k].Msk[i];
for(j=0;j<8;j++)
{
if((m&0x80)==0x80)
{
LCD_Write_Data_U16(fColor);
}
else
{
LCD_Write_Data_U16(bColor);
}
m<<=1;
}
}
}
}
}
以上是显示一个汉字的程序,可是我想显示多个汉字(如 LCD_PutGB1616_data(x,y,"多个汉字",fColor,bColor)),该怎么写这个LCD_PutGB1616_data()函数?
|