找回密碼
 立即注冊(cè)

QQ登錄

只需一步,快速開始

搜索
查看: 2010|回復(fù): 5
打印 上一主題 下一主題
收起左側(cè)

keil 設(shè)置00.C(110): warning C206: 'LCD_write_command': missing function-p...

[復(fù)制鏈接]
跳轉(zhuǎn)到指定樓層
樓主
ID:870180 發(fā)表于 2021-1-1 10:42 | 只看該作者 回帖獎(jiǎng)勵(lì) |倒序?yàn)g覽 |閱讀模式
#include<reg52.h>
#define uint8 unsigned char


sbit key1=P2^0;//調(diào)整
sbit key2=P2^1;//加1
sbit key3=P2^2;//減1
sbit speaker=P2^3;//蜂鳴器
sbit key4=P2^4;//鬧鐘設(shè)計(jì)
bit cal_year=1;//進(jìn)入判斷閏年標(biāo)志位
bit leap_year;//閏年標(biāo)志位
bit calculate=0;//日加一標(biāo)記
bit run=0;//鬧鐘標(biāo)志
bit beep=0;//整點(diǎn)報(bào)時(shí)標(biāo)志
//uint8 num = 0; //調(diào)整是給的脈沖
uint8 code str1[]="D:";
uint8 code str2[]="T:";
uint8 code str3[]="Wek";
uint8 daystr[]="2013-07-29";//年月日格式
uint8 timestr[]="21:30:59 N";//時(shí)分秒格式
uint8 daystr1[]="2013-07-29";//鬧鐘年月日格式
uint8 timestr1[]="21:30:59 N";//鬧鐘時(shí)分秒格式
uint8 numweek =0;//星期加1標(biāo)記
char week =1;//星期
char sec=53;//秒
char min=50;//分
char hour=23;//時(shí)
uint8 day=30;//日
uint8 month=9;
uint8 year=2013;//年
char week1=1;//鬧鐘星期
char sec1=58;//鬧鐘秒
char min1=50;//鬧鐘分
char hour1=23;//鬧鐘時(shí)
uint8 day1=30;//鬧鐘日
uint8 month1=9;//鬧鐘月
uint8 year1=2013;//鬧鐘年
uint8 WeekData1;//鬧鐘星期標(biāo)記
uint8 number=0;//定時(shí)
uint8 WeekData;//星期標(biāo)記
uint8 speaker_num;//整點(diǎn)報(bào)時(shí)次數(shù)
uint8 scan_key(void);//函數(shù)聲名 >

void TimeChange()
{
//時(shí)分秒
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;//設(shè)置為1時(shí)用或(|)
TMOD &=0xfd;//設(shè)置為0時(shí)用與(&)
TH0=0xDC;//定時(shí)10ms
TL0=0x00;
EA=1;
ET0=1;
TR0=1;
EX0=1;
}
void naozhong()
{
void Delay1Ms(unsigned int i);  //聲明延時(shí)函數(shù)
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);
}

分享到:  QQ好友和群QQ好友和群 QQ空間QQ空間 騰訊微博騰訊微博 騰訊朋友騰訊朋友
收藏收藏 分享淘帖 頂 踩
回復(fù)

使用道具 舉報(bào)

沙發(fā)
ID:275826 發(fā)表于 2021-1-1 12:18 | 只看該作者
缺少函數(shù)定義
回復(fù)

使用道具 舉報(bào)

板凳
ID:390416 發(fā)表于 2021-1-1 12:32 | 只看該作者
回復(fù)

使用道具 舉報(bào)

地板
ID:870180 發(fā)表于 2021-1-1 18:53 | 只看該作者
tyrl800 發(fā)表于 2021-1-1 12:18
缺少函數(shù)定義

怎么改呀,剛接觸,不太懂。謝謝
回復(fù)

使用道具 舉報(bào)

5#
ID:870180 發(fā)表于 2021-1-1 18:55 | 只看該作者
人人學(xué)會(huì)單片機(jī) 發(fā)表于 2021-1-1 12:32
LCD1602顯示 http://www.torrancerestoration.com/bbs/dpj-200685-1.html
LCD12864的 http://www.torrancerestoration.com/bbs/dpj-2004 ...

打不開
回復(fù)

使用道具 舉報(bào)

6#
ID:517951 發(fā)表于 2021-1-2 18:21 | 只看該作者
LCD_write_command(); 沒(méi)有聲明和定義。
需要include "lcd.h"
或者自定義如下函數(shù)
void LCD_write_command(unsigned char)
{
..............
}

評(píng)分

參與人數(shù) 1黑幣 +20 收起 理由
admin + 20 回帖助人的獎(jiǎng)勵(lì)!

查看全部評(píng)分

回復(fù)

使用道具 舉報(bào)

本版積分規(guī)則

小黑屋|51黑電子論壇 |51黑電子論壇6群 QQ 管理員QQ:125739409;技術(shù)交流QQ群281945664

Powered by 單片機(jī)教程網(wǎng)

快速回復(fù) 返回頂部 返回列表