标题: keil 设置00.C(110): warning C206: 'LCD_write_command': missing function-p... [打印本页]

作者: 羊羊22    时间: 2021-1-1 10:42
标题: keil 设置00.C(110): warning C206: 'LCD_write_command': missing function-p...
#include<reg52.h>
#define uint8 unsigned char


sbit key1=P2^0;//调整
sbit key2=P2^1;//加1
sbit key3=P2^2;//减1
sbit speaker=P2^3;//蜂鸣器
sbit key4=P2^4;//闹钟设计
bit cal_year=1;//进入判断闰年标志位
bit leap_year;//闰年标志位
bit calculate=0;//日加一标记
bit run=0;//闹钟标志
bit beep=0;//整点报时标志
//uint8 num = 0; //调整是给的脉冲
uint8 code str1[]="D:";
uint8 code str2[]="T:";
uint8 code str3[]="Wek";
uint8 daystr[]="2013-07-29";//年月日格式
uint8 timestr[]="21:30:59 N";//时分秒格式
uint8 daystr1[]="2013-07-29";//闹钟年月日格式
uint8 timestr1[]="21:30:59 N";//闹钟时分秒格式
uint8 numweek =0;//星期加1标记
char week =1;//星期
char sec=53;//秒
char min=50;//分
char hour=23;//时
uint8 day=30;//日
uint8 month=9;
uint8 year=2013;//年
char week1=1;//闹钟星期
char sec1=58;//闹钟秒
char min1=50;//闹钟分
char hour1=23;//闹钟时
uint8 day1=30;//闹钟日
uint8 month1=9;//闹钟月
uint8 year1=2013;//闹钟年
uint8 WeekData1;//闹钟星期标记
uint8 number=0;//定时
uint8 WeekData;//星期标记
uint8 speaker_num;//整点报时次数
uint8 scan_key(void);//函数声名 >

void TimeChange()
{
//时分秒
timestr[7]=sec%10+'0';
timestr[6]=sec/10+'0';
timestr[4]=min%10+'0';
timestr[3]=min/10+'0';
timestr[1]=hour%10+'0';
timestr[0]=hour/10+'0';
//年月日
daystr[9]=day%10+'0';
daystr[8]=day/10+'0';
daystr[6]=month%10+'0';
daystr[5]=month/10+'0';
daystr[3]=year%10+'0';
daystr[2]=year/10%10+'0';
daystr[1]=year/100%10+'0';
daystr[0]=year/1000+'0';
//星期
WeekData=week+'0';
}
void TimeChange1()
{

timestr1[7]=sec1%10+'0';
timestr1[6]=sec1/10+'0';
timestr1[4]=min1%10+'0';
timestr1[3]=min1/10+'0';
timestr1[1]=hour1%10+'0';
timestr1[0]=hour1/10+'0';

daystr1[9]=day1%10+'0';
daystr1[8]=day1/10+'0';
daystr1[6]=month1%10+'0';
daystr1[5]=month1/10+'0';
daystr1[3]=year1%10+'0';
daystr1[2]=year1/10%10+'0';
daystr1[1]=year1/100%10+'0';
daystr1[0]=year1/1000+'0';
//星期
WeekData1=week1+'0';
}
void systimer0_init(void)
{
TMOD |=0x01;//设置为1时用或(|)
TMOD &=0xfd;//设置为0时用与(&)
TH0=0xDC;//定时10ms
TL0=0x00;
EA=1;
ET0=1;
TR0=1;
EX0=1;
}
void naozhong()
{
void Delay1Ms(unsigned int i);  //声明延时函数
uint8 number=1;
uint8 a=0;
uint8 b=0;
if(0==key4)
{
Delay1Ms(5);
if(0==key4)
{

a=1;
LCD_write_command(0xc0+9);
LCD_write_command(0x0f);
}


作者: tyrl800    时间: 2021-1-1 12:18
缺少函数定义
作者: 人人学会单片机    时间: 2021-1-1 12:32
LCD1602显示 http://www.51hei.com/bbs/dpj-200685-1.html
LCD12864的 http://www.51hei.com/bbs/dpj-200462-1.html
作者: 羊羊22    时间: 2021-1-1 18:53
tyrl800 发表于 2021-1-1 12:18
缺少函数定义

怎么改呀,刚接触,不太懂。谢谢

作者: 羊羊22    时间: 2021-1-1 18:55
人人学会单片机 发表于 2021-1-1 12:32
LCD1602显示 http://www.51hei.com/bbs/dpj-200685-1.html
LCD12864的 http://www.51hei.com/bbs/dpj-2004 ...

打不开
作者: rayin    时间: 2021-1-2 18:21
LCD_write_command(); 没有声明和定义。
需要include "lcd.h"
或者自定义如下函数
void LCD_write_command(unsigned char)
{
..............
}




欢迎光临 (http://www.51hei.com/bbs/) Powered by Discuz! X3.1