compiling bishe.c...
BISHE.C(510): warning C214: 'Argument': conversion: pointer to non-pointer
BISHE.C(511): warning C214: 'Argument': conversion: pointer to non-pointer
BISHE.C(512): warning C214: 'Argument': conversion: pointer to non-pointer
BISHE.C(513): warning C214: 'Argument': conversion: pointer to non-pointer
BISHE.C(514): error C267: 'delay': requires ANSI-style prototype
bishe.c - 1 Error(s), 4 Warning(s).
#include <REG51.H>
#include <intrins.h>
#define uint unsigned int
#define uchar unsigned char
#define Dis_X_MAX 128-1
#define Dis_Y_MAX 64-1
sbit SPI_CS = P0^0; //定义CS接在P0.0端口
sbit SPI_SDA = P0^1; //定义SDA接在P0.1端口
sbit SPI_SCK = P0^2; //定义SCK接在P0.2端口
sbit SPI_RES = P0^3; //定义RESET接P0.3端口
sbit DS1302_CLK = P1^1; //实时时钟时钟线引脚
sbit DS1302_IO = P1^0; //实时时钟数据线引脚
sbit DS1302_RST = P1^2;
sbit Set = P2^0; //模式切换键
sbit Up = P2^1; //加法按钮
sbit Down = P2^2; //减法按钮
sbit out = P2^3; //立刻跳出调整模式按钮
sbit DQ = P3^7; //实时时钟复位线引脚
sbit ACC0 = ACC^0;
sbit ACC7 = ACC^7;
unsigned char X_Witch=6;
unsigned char Y_Witch=10;
unsigned char X_Witch_cn=16;
unsigned char Y_Witch_cn=16;
unsigned char Dis_Zero=0;
char hide_sec,hide_min,hide_hour,hide_day,hide_week,hide_month,hide_year; //秒,分,时到日,月,年位闪的计数
//温度传送数据IO口
char done,count,temp,flag,up_flag,down_flag;
uchar temp_value; //温度值
uchar TempBuffer[5],week_value[2];
//========================================================================
// 函数: void LCD_Init(void)
// 描述: LCD初始化程序,主要在里面完成端口初始化以及LCD模块的复位
// 参数: 无
// 返回: 无
// 备注:
// 版本:
// 2009/02/10 First version Mz Design
//========================================================================
void TimeDelay(unsigned int Timers)
{
unsigned int i;
while(Timers)
{
Timers--;
for(i=0;i<100;i++) ;
}
}
void LCD_Init(void)
{
//SS和SCK预先设置为高电平
SPI_SCK = 1;
SPI_CS = 1;
//复位LCD模块
SPI_RES = 0;
TimeDelay(50);
//保持低电平大概2ms左右
SPI_RES = 1;
TimeDelay(80); //延时大概10ms左右
}
//========================================================================
// 函数: void SPI_SSSet(unsigned char Status)
// 描述: 置SS线状态
// 参数: Status =1则置高电平,=0则置低电平
// 返回: 无
// 版本:
// 2009/02/10 First version Mz Design
//========================================================================
void SPI_SSSet(unsigned char Status)
{
if(Status) //判断是要置SS为低还是高电平?//SS置高电平
SPI_CS = 1;
else //SS置低电平
SPI_CS = 0;
}
//========================================================================
// 函数: void SPI_Send(unsigned char Data)
// 描述: 通过串行SPI口输送一个byte的数据置模组
// 参数: Data 要传送的数据
// 返回: 无
// 版本:
// 2007/07/17 First version
// 2007/07/24 V1.2 for MCS51 Keil C
//========================================================================
void SPI_Send(unsigned char Data)
{
unsigned char i=0;
for(i=0;i<8;i++)
{
//SCK置低
SPI_SCK = 0;
if(Data&0x0080)
SPI_SDA = 1;
else SPI_SDA = 0;//
//SCK上升沿触发串行数据采样
SPI_SCK = 1;
Data = Data<<1; //数据左移一位
}
}
//========================================================================
// 函数: void FontSet(unsigned char Font_NUM,unsigned char Color)
// 描述: ASCII字符字体设置
// 参数: Font_NUM 字体选择,以驱动所带的字库为准
// Color 文本颜色,仅作用于ASCII字库
// 返回: 无
// 备注:
// 版本:
// 2007/07/19 First version
//========================================================================
void FontSet(unsigned char Font_NUM,unsigned char Color)