|  | 
 
| 在uc/os2 里面的lcd函数,我把其中的Lcd_PutHZ( )移到TQ2440_Test的main了面,头文件也加了,在LCD屏幕上指定坐标点写ASCII码Lcd_PutASCII()  可以显示字母, 可用Lcd_PutHZ( )  就显示 乱符 .搞不懂unsigned short int QW, 高手有空解答下.
 
 /**************************************************************
 在LCD屏幕上指定坐标点写汉字
 **************************************************************/
 void Lcd_PutHZ(unsigned int x,unsigned int y,unsigned short int QW,unsigned int c,unsigned int bk_c,unsigned int st)
 {
 unsigned short int i,j;
 unsigned char *pZK,mask,buf;
 
 pZK = &__CHS[ (  ( (QW >> 8) - 1 )*94 + (QW & 0x00FF)- 1 )*32 ];
 for( i = 0 ; i < 16 ; i++ )
 {
 //左
 mask = 0x80;
 buf = pZK[i*2];
 for( j = 0 ; j < 8 ; j++ )
 {
 if( buf & mask )
 {
 PutPixel(x+j,y+i,c);
 }
 else
 {
 if( !st )
 {
 PutPixel(x+j,y+i,bk_c);
 }
 }
 mask = mask >> 1;
 }
 
 //右
 mask = 0x80;
 buf = pZK[i*2 + 1];
 for( j = 0 ; j < 8 ; j++ )
 {
 if( buf & mask )
 {
 PutPixel(x+j + 8,y+i,c);
 }
 else
 {
 if( !st )
 {
 PutPixel(x+j + 8,y+i,bk_c);
 }
 }
 mask = mask >> 1;
 }
 }
 }
 | 
 |