/********************************************************************
* 名稱 : PutGB1616()
* 功能 : 在x,y位置寫16*16點(diǎn)陣的漢字
* 輸入 : 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表示自建漢字庫中的個(gè)數(shù),循環(huán)查詢內(nèi)碼
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;
}
}
}
}
}
以上是顯示一個(gè)漢字的程序,可是我想顯示多個(gè)漢字(如 LCD_PutGB1616_data(x,y,"多個(gè)漢字",fColor,bColor)),該怎么寫這個(gè)LCD_PutGB1616_data()函數(shù)?
|