static void LCD12864_SetAddr(uint8 line, uint8 col)
{
uint8 ucLine, ucRow;
//line += 5;
col += 4;
if((line >= LCD12864_MAX_LINE) || (col >= LCD12864_MAX_ROW))
{
return;
}
ucLine = LCD_CMD_PAGE_LINE | (line&0x0f);
LCD12864_Cmd(ucLine);
SoftWaitUs(15);
ucRow = LCD_CMD_ROW_HIG | (col>>4);
LCD12864_Cmd(ucRow);
SoftWaitUs(15); // 15 us
ucRow = LCD_CMD_ROW_LOW | (col&0x0f);
LCD12864_Cmd(ucRow);
SoftWaitUs(15); // 15 us
}
static void LCD12864_Dis5X8(char ch)
{
uint8 ucCnt;
if((ch >= 0x20)&&(ch <0x7f))
{
uint8 ucChar = ch - 0x20;
for(ucCnt=0; ucCnt《5; ucCnt++)
{
LCD12864_Dat( aucAsciiTable5x7[ucChar][ucCnt]);
}
//LCD12864_Dat(0x00);
}
else if(ch==0x00) //不需要顯示,清空指定位置
{
for(ucCnt=0; ucCnt《5; ucCnt++)
{
LCD12864_Dat(0x00);
}
}
LCD12864_Dat(0x00);
}
void LCD12864_Clear(void)
{
uint8 ucLine, ucRow;
for(ucLine=0; ucLine《LCD12864_MAX_LINE; ucLine++)
{
LCD12864_SetAddr(ucLine, 0);
for(ucRow=0; ucRow《LCD12864_MAX_ROW; ucRow++)
{
LCD12864_Dat(0x00);
}
}
}
void LCD12864_DisChar(uint8 line, uint8 col, char ch)
{
if (( line
{
LCD12864_SetAddr(line, col*HAL_LCD_FONT_ROWS);
LCD12864_Dis5X8(ch);
}
}
void LCD12864_DisStr(uint8 line, char* pStr)
{
uint8 ucCnt = 0;
for ( ucCnt = 0 ; ucCnt
{
if ( ’