欧美极品高清xxxxhd,国产日产欧美最新,无码AV国产东京热AV无码,国产精品人与动性XXX,国产传媒亚洲综合一区二区,四库影院永久国产精品,毛片免费免费高清视频,福利所导航夜趣136

標題: 還有一個小問題不會改了error C267: 'write_data': requires ANSI-style prototype [打印本頁]

作者: sensors    時間: 2023-11-4 16:40
標題: 還有一個小問題不會改了error C267: 'write_data': requires ANSI-style prototype
#ifndef _LCD1602_H_
#define _LCD1602_H_

#include <reg52.h>

/* 定義單片機的管腳 */
#define LCD1602_DATAPINS  P0         //P0口用來發送數據,一整個字節地發送
sbit LCD1602_RS = P2^6;                         //P26口聲明P0口發的是數據還是命令,1為數據,0為命令
sbit LCD1602_RW = P2^5;                           //P25口聲明現在是將數據寫入LCD顯示屏,還是從LCD讀出數據。1為讀,0為寫
sbit LCD1602_E = P2^7;                     //P27口為LCD的使能端,高電平有效

/* 定義LCD使用4位數據管腳的宏,如果使用4位數據管腳的LCD,就打開下面的注釋 */
// #define LCD1602_4DATAPINS

/* 函數聲明 */
void LCD1602_WriteInstrucion(unsigned char i);
void LCD1602_Init();
void LCD1602_WriteData(unsigned char dat);
void LCD1602_WriteSfm(unsigned char sfm);
void LCD1602_WriteCom(unsigned char com);
void LCD_Delay(unsigned int i);
void write_sfm(unsigned char sfm);
#endif




#include<reg52.h>
#include<lcd1602.h>
#define uchar unsigned char
#define uint unsigned int
uchar int_time;
uchar second;
uchar minute;
uchar hour;
uchar code date[]="H.I.T.CHINA";
uchar code time[]="TIME 23:59:55";
uchar second=55,minute59,hour=23;
void write_data();
void clock_init()
{
   uchar i,j;
   for(i=0;i<16;i++)
   {
      write_data(date[ i]);
        }
        write_com(0x80+0x40);
        for(j=0;j<16;j++)
        {
           write_data(time[j]);
        }
}

void clock_write(uint s,uint m,uint h)
{
   write_sfm(0x47,h);
   write_sfm(0x4a,m);
   write_sfm(0x4d,s);
}

void main()
{
   init1602();
   clock_init();
   TMOD=0x01;
   EA=1;
   ET0=1;
   TH0=(65536-50000)/256;
   TL0=(65536-50000)%256;
   TR0=1;
   int_time=0;
   second=55;
   minute=59;
   hour=23;
   while(1)
   {
      clock_write(seconf,minute,hour);
   }
}

void T0_interserve(void) interrupt 1 using 1
{  int_time++;
   if(int_time==20)
   {
      int_time=0;
          second++;
   }
   if(second==60)
   {
   second=0;
   minute++;
   }
   if(minute==60)
   {
      minute=0;
          hour++;
        }
        if(hour==24)
        {
           hour=0;
        }

TH0=(65536-50000)/256;
TL0=(65536-50000)%256;
}



B1103.C(18): error C267: 'write_data': requires ANSI-style prototype
作者: Hephaestus    時間: 2023-11-4 18:24
把writedata改成LCD1602_WriteData。




歡迎光臨 (http://www.raoushi.com/bbs/) Powered by Discuz! X3.1