[AVR单片机] syntax error; found `uchar' expecting `;'

[复制链接]
4426|7
 楼主 | 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-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-9-17 11:39 | 显示全部楼层
我用的是ICC AVR

使用特权

评论回复
| 2013-9-17 11:43 | 显示全部楼层
uchar 不是定义的关键字. 楼主可能没有定义吧

使用特权

评论回复
| 2013-9-17 11:54 | 显示全部楼层
加一句#define uchar unsigned char   再试试

使用特权

评论回复
 楼主 | 2013-9-17 13:14 | 显示全部楼层
定义了,#define  uchar  unsigned char

使用特权

评论回复
| 2019-4-6 10:31 | 显示全部楼层
楼主解决了么?我也出现了同样的问题,求告知

使用特权

评论回复
| 2019-4-7 00:13 | 显示全部楼层
typedef unsigned char uchar;

使用特权

评论回复
扫描二维码,随时随地手机跟帖
您需要登录后才可以回帖 登录 | 注册

本版积分规则

我要发帖 投诉建议 创建版块 申请版主

快速回复

您需要登录后才可以回帖
登录 | 注册
高级模式

论坛热帖

关闭

热门推荐上一条 /7 下一条

在线客服 快速回复 返回顶部 返回列表