打印
[AVR单片机]

syntax error; found `uchar' expecting `;'

[复制链接]
5257|7
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
自由自在2013|  楼主 | 2013-9-17 11:09 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
#ifndef Data_H
#define Data_H

#include "iom64v.h"
#include "LCD.H"

flash uchar ON[]  ={0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF};
flash uchar OFF[]  ={0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00};

/*================大玻璃數據======================*/
flash uchar IC1Data1[]={0XE0,0XE0,0XE0,0XE0,0XE0,0X06,0X07,0X07,0X07,0X07,0X07,0X07};
flash uchar IC1Data2[]={0XBE,0XBE,0XBE,0XBE,0XBE,0XEB,0X7D,0X7D,0X7D,0X7D,0X7D,0X7D};
flash uchar IC1Data3[]={0XFA,0XFA,0XFA,0XFA,0XFA,0XAF,0X5F,0X5F,0X5F,0X5F,0X5F,0X5F};
flash uchar IC1Data4[]={0XE3,0XE3,0XE3,0XE3,0XE3,0X3E,0XC7,0XC7,0XC7,0XC7,0XC7,0XC7};

flash uchar IC1Data5[]={0XDB,0XDB,0XDB,0XDB,0XDB,0XBD,0XDB,0XDB,0XDB,0XDB,0XDB,0XDB};
flash uchar IC1Data6[]={0XDF,0XDF,0XDF,0XDF,0XDF,0XFD,0XFB,0XFB,0XFB,0XFB,0XFB,0XFB};
flash uchar IC1Data7[]={0XF0,0XF0,0XF0,0XF0,0XF0,0X0F,0X0F,0X0F,0X0F,0X0F,0X0F,0X0F};
flash uchar IC1Data8[]={0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF};
flash uchar IC1Data9[]={0XFB,0XFB,0XFB,0XFB,0XFB,0XBF,0XDF,0XDF,0XDF,0XDF,0XDF,0XDF};


//================小玻璃數據======================
flash uchar IC2Data1[]={0XE0,0XE0,0X0E,0X0E};
flash uchar IC2Data2[]={0XBE,0XBE,0XEB,0XEB};
flash uchar IC2Data3[]={0XFA,0XFA,0XAF,0XAF};
flash uchar IC2Data4[]={0XE3,0XE3,0X3E,0X3E};
flash uchar IC2Data5[]={0XDB,0XDB,0XBD,0XBD};
flash uchar IC2Data6[]={0XDF,0XDF,0XFD,0XFD};
flash uchar IC2Data7[]={0XF0,0XF0,0X0F,0X0F};
flash uchar IC2Data8[]={0XFF,0XFF,0XFF,0XFF};
flash uchar IC2Data9[]={0XFB,0XFB,0XBF,0XBF};
#endif
各位高手这是我定义的液晶显示的段码。编译时总出现 syntax error; found `uchar' expecting `;'这样的错误提示,是哪里有错误,请指教!

相关帖子

沙发
自由自在2013|  楼主 | 2013-9-17 11:13 | 只看该作者
!E E:\\Data.h(7): syntax error; found `uchar' expecting `;'
!E E:\\Data.h(7): syntax error; found `ON' expecting `;'
!E E:\\Data.h(8): syntax error; found `uchar' expecting `;'
!E E:\\Data.h(8): syntax error; found `OFF' expecting `;'
!E E:\\Data.h(11): syntax error; found `uchar' expecting `;'
!E E:\\Data.h(11): syntax error; found `IC1Data1' expecting `;'
!E E:\\Data.h(12): syntax error; found `uchar' expecting `;'
!E E:\\Data.h(12): syntax error; found `IC1Data2' expecting `;'
!E E:\\Data.h(13): syntax error; found `uchar' expecting `;'
!E E:\Data.h(13): syntax error; found `IC1Data3' expecting `;'
!E E:\\Data.h(14): syntax error; found `uchar' expecting `;'
!E E:\\Data.h(14): syntax error; found `IC1Data4' expecting `;'
!E E:\\Data.h(15): syntax error; found `uchar' expecting `;'
!E E:\\Data.h(15): syntax error; found `IC1Data5' expecting `;'
!E E:\\Data.h(16): syntax error; found `uchar' expecting `;'
!E E:\\Data.h(16): syntax error; found `IC1Data6' expecting `;'
!E E:\Data.h(17): syntax error; found `uchar' expecting `;'
!E E:\\Data.h(17): syntax error; found `IC1Data7' expecting `;'
!E E:\\Data.h(18): syntax error; found `uchar' expecting `;'
!E E:\\Data.h(18): syntax error; found `IC1Data8' expecting `;'
!E E:\\Data.h(19): too many errors
C:\iccv7avr\bin\imakew.exe: Error code 1
Done: there are error(s). Exit code: 1. Tue Sep 17 11:10:32 2013

报错信息如上。

使用特权

评论回复
板凳
自由自在2013|  楼主 | 2013-9-17 11:39 | 只看该作者
我用的是ICC AVR

使用特权

评论回复
地板
airwill| | 2013-9-17 11:43 | 只看该作者
uchar 不是定义的关键字. 楼主可能没有定义吧

使用特权

评论回复
5
qin552011373| | 2013-9-17 11:54 | 只看该作者
加一句#define uchar unsigned char   再试试

使用特权

评论回复
6
自由自在2013|  楼主 | 2013-9-17 13:14 | 只看该作者
定义了,#define  uchar  unsigned char

使用特权

评论回复
7
1243123132| | 2019-4-6 10:31 | 只看该作者
楼主解决了么?我也出现了同样的问题,求告知

使用特权

评论回复
8
linqing171| | 2019-4-7 00:13 | 只看该作者
typedef unsigned char uchar;

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

26

主题

83

帖子

3

粉丝