程序中出现warning C206: 'Date_dispaly':missing function-prototype
#include<reg51.h>#include<intrins.h>#defineucharunsignedchar#defineuintunsignedintuch...
#include <reg51.h>#include <intrins.h>#define uchar unsigned char#define uint unsigned intuchar time_data[7];uchar write_add[7]={0x8c,0x8a,0x88,0x86,0x84,0x82,0x80}; //数据的地址uchar read_add[7]={0x8d,0x8b,0x89,0x87,0x85,0x83,0x81};uchar code table1[]=" 2000/00/00 ";uchar code table2[]=" 00:00:00 00";uchar code table3[]=" "; //清屏内容uchar code table4[]=" Set Real Time"; uchar code table5[]=" Set Open Time";uchar code table6[]=" Start Time: ";uchar code table7[]=" 00:00:00 ";uchar code table8[]=" End Time: ";sbit rs=P1^0; //LCD 1602 sbit rw=P1^1; //LCD 1602 sbit e=P1^2; //LCD 1602 void LCD_Clean(uchar i){ uchar num; if(i==1) { write_com(0x80); for(num=0;num<16;num++) { write_date(table3[num]); delay1(1); } } if(i==2) { write_com(0x80+0x40); for(num=0;num<16;num++) { write_date(table3[num]); delay1(1); } }}void LCD_Display_String(unsigned char line,unsigned char *string){ unsigned char i; unsigned char address=0; if(line==1) { address=0x80; else if(line==2) { address=0x80+0x40; } for(i=0;i<16;i++) { write_com(address); write_date(string[i]); address++; }}void TimeDisplay(void){ read_rtc(); Date_dispaly(0x80+0x40+9,time_data[6]); //显示秒 Date_dispaly(0x80+0x40+6,time_data[5]); //显示分 Date_dispaly(0x80+0x40+3,time_data[4]); //显示时 Date_dispaly(0x80+11,time_data[3]); //显示日 Date_dispaly(0x80+8,time_data[2]); //显示月 Date_dispaly(0x80+0x40+14,time_data[1]); //显示周 Date_dispaly(0x80+5,time_data[0]); //显示年 // Year/10*16+Year% 10 Hour=time_data[4]/16*10+time_data[4]%16;; Minute=time_data[5]/16*10+time_data[5]%16;; Second=time_data[6]/16*10+time_data[6]%16;;}
展开
1个回答
展开全部
Date_Display要么没函数要么没声明,同页面void声明,不同页extern 或者放入共用的.h文件,
void Date_Display(unsigned char display , unsigned int data);
//最好数组最好采用地址指针方式, 后面的uint8_t data部分改成uint *addr
//你time_data的声明我记得没有这种 intuchar 吧,要么int要么char int四字节,char一字节
void Date_Display(unsigned char display , unsigned int data);
//最好数组最好采用地址指针方式, 后面的uint8_t data部分改成uint *addr
//你time_data的声明我记得没有这种 intuchar 吧,要么int要么char int四字节,char一字节
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询