打印

用C语言编写的液晶显示程序,麻烦大家帮我看下!谢谢

[复制链接]
2520|7
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
boling|  楼主 | 2007-7-31 09:19 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
我在用C语言编写程序的时候,会出现如下错误,请教下大家,谢谢~~~
这是凌阳单片机里面的一个液晶显示程序:
其中一个子函数:
void R_display (g_fRx)
{//float g_fRx;
    unsigned int     g_array[4]={};
    unsigned int     g_uiAx; 
     int i,j;                          //用于延时
        LCD501_Init(0xff);
        LCD501_ClrScreen(0);    //整屏清屏
        LCD501_FontSet(1);         //设置大号的ASCII码字体
        LCD501_Bitmap(0,16,(unsigned int *)encoding_00);      //电
        LCD501_Bitmap(16,16,(unsigned int *)encoding_01);      //阻
        LCD501_Bitmap(32,16,(unsigned int *)encoding_02);      //值
        LCD501_Bitmap(48,16,(unsigned int *)encoding_03);      //:
    if(g_fRx<100)
    {   g_array[3]=0;        //电阻小于100欧姆
        g_array[2]=0;
        g_array[1]=0; 
        g_array[0]=0;
    }

出现一下一些错误,大家帮我分析分析,谢谢啦!!
ERROR: syntax error before `{'
ERROR: parse error before `0xff'
warning: WARNING: type defaults to `int' in declaration of               `LCD501_Init'
ERROR: conflicting types for `LCD501_Init'
ERROR: previous declaration of `LCD501_Init'
WARNING: data definition has no type or storage class
ERROR:parse error before `0'
warning: WARNING: type defaults to `int' in declaration of               `LCD501_ClrScreen'
ERROR: conflicting types for `LCD501_ClrScreen'
ERROR: previous declaration of `LCD501_ClrScreen'
warning: WARNING: data definition has no type or storage class
ERROR: parse error before `1'
warning: WARNING: type defaults to `int' in declaration of               `LCD501_FontSet'
ERROR: conflicting types for `LCD501_FontSet'
ERROR: previous declaration of `LCD501_FontSet'
warning: WARNING: data definition has no type or storage class
ERROR: parse error before `0'
ERROR: parse error before `16'
ERROR: parse error before `32'
ERROR: parse error before `48'
warning: WARNING: type defaults to `int' in declaration of `g_array'
ERROR: invalid initializer
warning: WARNING: data definition has no type or storage class
warning: WARNING: type defaults to `int' in declaration of `g_array'
ERROR: conflicting types for `g_array'
ERROR: previous declaration of `g_array'
ERROR: invalid initializer
warning: WARNING: data definition has no type or storage class
warning: WARNING: type defaults to `int' in declaration of `g_array'
ERROR: conflicting types for `g_array'
ERROR: previous declaration of `g_array'
ERROR: invalid initializer
warning: WARNING: data definition has no type or storage class
ERROR: parse error before `}'
warning: WARNING: type defaults to `int' in declaration of `g_array'
ERROR: conflicting types for `g_array'
ERROR: previous declaration of `g_array'

相关帖子

沙发
jimoom| | 2007-7-31 09:22 | 只看该作者

很想帮你,但不知道从何入手!

很想帮你,但不知道从何入手!

使用特权

评论回复
板凳
ayb_ice| | 2007-7-31 09:38 | 只看该作者

这些都是基本错误,常见于标点符号等。。。

使用特权

评论回复
地板
wjy1107| | 2007-7-31 12:20 | 只看该作者

是不小心丢了最后一个},还是压根就没有啊?

使用特权

评论回复
5
suifeg| | 2007-7-31 13:45 | 只看该作者

你在这个程序后面再加一个}试试

使用特权

评论回复
6
twenson| | 2007-7-31 14:39 | 只看该作者

H

仔细看下程序是不是确实缺了一个}.在者LCD501_Bitmap(0,16,(unsigned int *)encoding_00);是不是有问题.

使用特权

评论回复
7
boling|  楼主 | 2007-7-31 16:36 | 只看该作者

谢谢 大家

谢谢

使用特权

评论回复
8
平常人| | 2007-7-31 22:21 | 只看该作者

错误太多了

void R_display (g_fRx)
 参数g_fRx的类型哪里去了?

所有调用的函数的说明哪里去了?
 LCD501_Init()
 LCD501_ClrScreen()
 LCD501_FontSet()

使用特权

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

本版积分规则

5

主题

6

帖子

1

粉丝