之前引用过古道热肠大侠LCD显示的函数
void LcdShowString(uchar ucCharRow, uchar ucCharCol, uchar *DispString)
void LcdShowString(uchar ucCharRow, uchar ucCharCol, uchar *DispString)
{
uchar uci;
uchar ShowBuff[2];
uchar ucStringLength;
ucStringLength = strlen(DispString);
for(uci = 0; uci < ucStringLength; )
{
if (DispString[uci] <= 0x80) //english
{
ShowBuff[0] = DispString[uci];
ShowBuff[1] = 0x00;
ShowWord(ucCharRow,( ucCharCol + uci), ShowBuff);
uci += 1;
}
else //hanzi
{
ShowBuff[0] = DispString[uci];
ShowBuff[1] = DispString[uci + 1];
ShowWord(ucCharRow,( ucCharCol + uci), ShowBuff);
uci += 2;
}
//超出LCD显示范围时,截尾。
if((ucCharCol+uci)>c_LCD_MaxColNumber)
{
break;
}
}
}
一般在应用时候都是: LcdShowString(2,0,"abcd");
LcdShowString(3,0,"某某汉字");
请问有没有一个函数能实现以下功能:例如:uchar temp = 2;
LcdShowString(2,0,(temp));同样也能实现显示数字2 |