程序从keil移植过来,在keil通过,移植后错误很多一一改过,开始时未出现下面的错误,
Write_Cmd_Dat(0x0001,0x0100);
Write_Cmd_Dat(0x0002,0x0700);
Write_Cmd_Dat(0x0003,0x1030);
Write_Cmd_Dat(0x0004,0x0000);
Write_Cmd_Dat(0x0008,0x0207);
Write_Cmd_Dat(0x0009,0x0000);
Write_Cmd_Dat(0x000A,0x0000);
Write_Cmd_Dat(0x000C,0x0000);
Write_Cmd_Dat(0x000D,0x0000);
Write_Cmd_Dat(0x000F,0x0000);
Write_Cmd_Dat(0x0010,0x0000);
Write_Cmd_Dat(0x0011,0x0007);
Write_Cmd_Dat(0x0012,0x0000);
上面通过 ,下面报错
Write_Cmd_Dat(0x0013,0x0000);(356行)
Warning[Pe012]: parsing restarts here after previous syntax error D:\IAR\My51\时钟温度1 2.4寸彩屏显示\9325TP.C 356
Error[Pe079]: expected a type specifier D:\IAR\My51\时钟温度1 2.4寸彩屏显示\9325TP.C 357
Error[Pe079]: expected a type specifier D:\IAR\My51\时钟温度1 2.4寸彩屏显示\9325TP.C 357
Error[Pe260]: explicit type is missing ("int" assumed) D:\IAR\My51\时钟温度1 2.4寸彩屏显示\9325TP.C 357
Error[Pe147]: declaration is incompatible with "__near_func __xdata_reentrant
void Write_Cmd_Dat(unsigned char, unsigned int)" (declared at line 8 of "D:\IAR\
My51\时钟温度1 2.4寸彩屏显示\9325tp.h")
Write_Cmd_Dat(0x0010,0x1290);
Error[Pe079]: expected a type specifier ......
Error[Pe079]: expected a type specifier......
Error[Pe260]: explicit type is missing ("int" assumed) D:\IAR\My51\时钟温度1 2.4寸彩屏显示\9325TP.C 358
Write_Cmd_Dat(0x0011,0x0227);
Write_Cmd_Dat(0x0012,0x001d);
Write_Cmd_Dat(0x0013,0x1500);
Write_Cmd_Dat(0x0029,0x0018);
Write_Cmd_Dat(0x002B,0x000D);
Write_Cmd_Dat(0x0030,0x0004);
Write_Cmd_Dat(0x0031,0x0307);
Write_Cmd_Dat(0x0032,0x0002);
Write_Cmd_Dat(0x0035,0x0206);
Write_Cmd_Dat(0x0036,0x0408);
Write_Cmd_Dat(0x0037,0x0507);
Write_Cmd_Dat(0x0038,0x0204);
Write_Cmd_Dat(0x0039,0x0707);
Write_Cmd_Dat(0x003C,0x0405);
Write_Cmd_Dat(0x003D,0x0F02);
Write_Cmd_Dat(0x0050,0x0000);
Write_Cmd_Dat(0x0051,0x00EF);
Write_Cmd_Dat(0x0052,0x0000);
Write_Cmd_Dat(0x0053,0x013F);
Write_Cmd_Dat(0x0060,0xA700);
Write_Cmd_Dat(0x0061,0x0001);
Write_Cmd_Dat(0x006A,0x0000);
Write_Cmd_Dat(0x0080,0x0000);
Write_Cmd_Dat(0x0081,0x0000);
Write_Cmd_Dat(0x0082,0x0000);
Write_Cmd_Dat(0x0083,0x0000);
Write_Cmd_Dat(0x0084,0x0000);
Write_Cmd_Dat(0x0085,0x0000);
//
Write_Cmd_Dat(0x0090,0x0010);
Write_Cmd_Dat(0x0092,0x0600);
Write_Cmd_Dat(0x0093,0x0003);
下面四句未报错
Write_Cmd_Dat(0x0095,0x0110);
Write_Cmd_Dat(0x0097,0x0000);
Write_Cmd_Dat(0x0098,0x0000);
Write_Cmd_Dat(0x0007,0x0133);
Write_Cmd_Dat(0x0001,0x0100);
Write_Cmd_Dat(0x0002,0x0700);
Write_Cmd_Dat(0x0003,0x1030);
Write_Cmd_Dat(0x0004,0x0000);
Write_Cmd_Dat(0x0008,0x0207);
Write_Cmd_Dat(0x0009,0x0000);
Write_Cmd_Dat(0x000A,0x0000);
Write_Cmd_Dat(0x000C,0x0000);
Write_Cmd_Dat(0x000D,0x0000);
Write_Cmd_Dat(0x000F,0x0000);
Write_Cmd_Dat(0x0010,0x0000);
Write_Cmd_Dat(0x0011,0x0007);
Write_Cmd_Dat(0x0012,0x0000);
上面通过 ,下面报错
Write_Cmd_Dat(0x0013,0x0000);(356行)
Warning[Pe012]: parsing restarts here after previous syntax error D:\IAR\My51\时钟温度1 2.4寸彩屏显示\9325TP.C 356
Error[Pe079]: expected a type specifier D:\IAR\My51\时钟温度1 2.4寸彩屏显示\9325TP.C 357
Error[Pe079]: expected a type specifier D:\IAR\My51\时钟温度1 2.4寸彩屏显示\9325TP.C 357
Error[Pe260]: explicit type is missing ("int" assumed) D:\IAR\My51\时钟温度1 2.4寸彩屏显示\9325TP.C 357
Error[Pe147]: declaration is incompatible with "__near_func __xdata_reentrant
void Write_Cmd_Dat(unsigned char, unsigned int)" (declared at line 8 of "D:\IAR\
My51\时钟温度1 2.4寸彩屏显示\9325tp.h")
Write_Cmd_Dat(0x0010,0x1290);
Error[Pe079]: expected a type specifier ......
Error[Pe079]: expected a type specifier......
Error[Pe260]: explicit type is missing ("int" assumed) D:\IAR\My51\时钟温度1 2.4寸彩屏显示\9325TP.C 358
Write_Cmd_Dat(0x0011,0x0227);
Write_Cmd_Dat(0x0012,0x001d);
Write_Cmd_Dat(0x0013,0x1500);
Write_Cmd_Dat(0x0029,0x0018);
Write_Cmd_Dat(0x002B,0x000D);
Write_Cmd_Dat(0x0030,0x0004);
Write_Cmd_Dat(0x0031,0x0307);
Write_Cmd_Dat(0x0032,0x0002);
Write_Cmd_Dat(0x0035,0x0206);
Write_Cmd_Dat(0x0036,0x0408);
Write_Cmd_Dat(0x0037,0x0507);
Write_Cmd_Dat(0x0038,0x0204);
Write_Cmd_Dat(0x0039,0x0707);
Write_Cmd_Dat(0x003C,0x0405);
Write_Cmd_Dat(0x003D,0x0F02);
Write_Cmd_Dat(0x0050,0x0000);
Write_Cmd_Dat(0x0051,0x00EF);
Write_Cmd_Dat(0x0052,0x0000);
Write_Cmd_Dat(0x0053,0x013F);
Write_Cmd_Dat(0x0060,0xA700);
Write_Cmd_Dat(0x0061,0x0001);
Write_Cmd_Dat(0x006A,0x0000);
Write_Cmd_Dat(0x0080,0x0000);
Write_Cmd_Dat(0x0081,0x0000);
Write_Cmd_Dat(0x0082,0x0000);
Write_Cmd_Dat(0x0083,0x0000);
Write_Cmd_Dat(0x0084,0x0000);
Write_Cmd_Dat(0x0085,0x0000);
//
Write_Cmd_Dat(0x0090,0x0010);
Write_Cmd_Dat(0x0092,0x0600);
Write_Cmd_Dat(0x0093,0x0003);
下面四句未报错
Write_Cmd_Dat(0x0095,0x0110);
Write_Cmd_Dat(0x0097,0x0000);
Write_Cmd_Dat(0x0098,0x0000);
Write_Cmd_Dat(0x0007,0x0133);