int main(void)
{
SZ_STM32_SystickInit(1000000);
SZ_STM32_LCDInit();
LCD_Clear(LCD_COLOR_GREEN);
LCD_DrawChar(10, 100, &ASCII_Table[0]);
while (1);
}
void LCD_DrawChar(uint16_t Xpos, uint16_t Ypos, const uint8_t *cpFontArray)
{
u16 i=0;
u16 j=0;
uint32_t index = 0;
for (i=0;i<48;i++)
{
for (j=0;j<8;j++)
{
if((cpFontArray[index*3]>> 7-j) & 0x01 == 0x01)
{
LCD_SetPoint(Xpos+i,Ypos+j,TextColor);
}
else
{
LCD_SetPoint(Xpos+i,Ypos+j,BackColor);
}
if((cpFontArray[index*3+1]>> 7-j) & 0x01 == 0x01)
{
LCD_SetPoint(Xpos+i,Ypos+j+8,TextColor);
}
else
{
LCD_SetPoint(Xpos+i,Ypos+j+8,BackColor);
}
if((cpFontArray[index*3+2]>> 7-j) & 0x01 == 0x01)
{
LCD_SetPoint(Xpos+i,Ypos+j+8*2,TextColor);
}
else
{
LCD_SetPoint(Xpos+i,Ypos+j+8*2,BackColor);
}
// Delay_ms(100);
}
index++;
}
}
unsigned char ASCII_Table[144] = // ASCII
{
0x00,0x00,0x00, // -1-
0x00,0x00,0x00,
0x00,0x00,0x00,
0x00,0x00,0x00,
0x00,0x00,0x00,
0x00,0x00,0x00,
0x00,0x00,0x00,
0x00,0x00,0x00,
0x00,0x08,0x00,
0x00,0x18,0x00,
0x00,0x38,0x00,
0x07,0xF8,0x00,
0x00,0x38,0x00,
0x00,0x38,0x00,
0x00,0x38,0x00,
0x00,0x38,0x00,
0x00,0x38,0x00,
0x00,0x38,0x00,
0x00,0x38,0x00,
0x00,0x38,0x00,
0x00,0x38,0x00,
0x00,0x38,0x00,
0x00,0x38,0x00,
0x00,0x38,0x00,
0x00,0x38,0x00,
0x00,0x38,0x00,
0x00,0x38,0x00,
0x00,0x38,0x00,
0x00,0x38,0x00,
0x00,0x38,0x00,
0x00,0x38,0x00,
0x00,0x38,0x00,
0x00,0x38,0x00,
0x00,0x38,0x00,
0x00,0x38,0x00,
0x00,0x38,0x00,
0x00,0x38,0x00,
0x00,0x38,0x00,
0x00,0x7C,0x00,
0x07,0xFF,0xC0,
0x00,0x00,0x00,
0x00,0x00,0x00,
0x00,0x00,0x00,
0x00,0x00,0x00,
0x00,0x00,0x00,
0x00,0x00,0x00,
0x00,0x00,0x00,
0x00,0x00,0x00,
};
这是一个关于ILI9320显示一个字符“1”的主要程序,不明白三个if语句中的判断条件是什么意思,求教各位 |