我的TFT显示的字母都是反的,汉字都是左右颠倒,不知道哪里的问题位置
void TFT_Set_Pos(uint x1,uint y1,uint x2,uint y2)//240x320
{
TFT_Write_Reg(0x2a);
TFT_Write_8Data(x1>>8);
TFT_Write_8Data(x1);
TFT_Write_8Data(x2>>8);
TFT_Write_8Data(x2);
TFT_Write_Reg(0x2b);
TFT_Write_8Data(y1>>8);
TFT_Write_8Data(y1);
TFT_Write_8Data(y2>>8);
TFT_Write_8Data(y2);
TFT_Write_Reg(0x2C);
}
汉字
void TFT_Show_Hanzi16x16(uint x,uint y,uchar index)
{
uchar i,j;
uchar *temp=hanzi16x16; //Ö¸Ïò′æ·Åoo×ÖμÄêy×é
TFT_Set_Pos(x,y,x+15,y+15); //éèÖÃÇøóò
temp+=index*32; //1¸öoo×Ö32×Ö½ú,
for(j=0;j<32;j++)
{
for(i=0;i<8;i++)
{
if((*temp&(1<<i))!=0)
{
TFT_Write_16Data(POINT_COLOR);
}
else
{
TFT_Write_16Data(BACK_COLOR);
}
}
temp++;//ÏÂò»¸ö×Ö½ú
}
}
|