原型
void LCD_PutString(unsigned short x, unsigned short y, unsigned char *s, unsigned int fColor, unsigned int bColor) {
unsigned char l=0;
while(*s) {
if( *s < 0x80)
{
LCD_PutChar(x+l*8,y,*s,fColor,bColor);
s++;l++;
}
else
{
PutGB1616(x+l*8,y,(unsigned char*)s,fColor,bColor);
s+=2;l+=2;
}
}
}
引用
LCD_PutString(0,0,"开始",White,Blue2);
LCD_PutString(100,150,"START",White,Blue);
在Keill上编译不报错,在Mplab X IDE 报错“非法指针类型之间的转换”
原型
void LCD_PutString(unsigned short x, unsigned short y, unsigned char *s, unsigned int fColor, unsigned int bColor) {
unsigned char l=0;
while(*s) {
if( *s < 0x80)
{
LCD_PutChar(x+l*8,y,*s,fColor,bColor);
s++;l++;
}
else
{
PutGB1616(x+l*8,y,(unsigned char*)s,fColor,bColor);
s+=2;l+=2;
}
}
}
引用
LCD_PutString(0,0,"开始",White,Blue2);
LCD_PutString(100,150,"START",White,Blue);
在Keill上编译不报错,在Mplab X IDE 报错“非法指针类型之间的转换”
举报