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

[复制链接]
3711|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 | 显示全部楼层

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

suifeg 发表于 2007-7-31 13:45 | 显示全部楼层

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

twenson 发表于 2007-7-31 14:39 | 显示全部楼层

H

仔细看下程序是不是确实缺了一个}.在者LCD501_Bitmap(0,16,(unsigned int *)encoding_00);是不是有问题.
 楼主| boling 发表于 2007-7-31 16:36 | 显示全部楼层

谢谢 大家

谢谢
平常人 发表于 2007-7-31 22:21 | 显示全部楼层

错误太多了

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

所有调用的函数的说明哪里去了?
 LCD501_Init()
 LCD501_ClrScreen()
 LCD501_FontSet()
您需要登录后才可以回帖 登录 | 注册

本版积分规则

5

主题

6

帖子

1

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