找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 604|回复: 1
收起左侧

第一排是报错,可以帮忙看一下吗error C267:requires ANSI-style prototype

[复制链接]
ID:1109770 发表于 2024-1-20 17:49 | 显示全部楼层 |阅读模式
main.c(13): error C267: 'DS1302_WriteByte': requires ANSI-style prototype
#include <REGX52.H>
#include"LCD1602.H"
#include"DS1302.H"
void DS1302_WriteByte();

unsigned char Second;

void main()
{
        LCD_Init();
        DS1302_Init();
        LCD_ShowString(1,1,"RTC");
        DS1302_WriteByte(0x80,0x03);
        Second=DS1302_ReadByte(0x81);
        LCD_ShowNum(2,1,Second,3);
  while(1)
        {

        }               
}

#include <REGX52.H>
#include"LCD1602.H"
#include"DS1302.H"
void DS1302_WriteByte();

unsigned char Second;

void main()
{
        LCD_Init();
        DS1302_Init();
        LCD_ShowString(1,1,"RTC");
        DS1302_WriteByte(0x80,0x03);
        Second=DS1302_ReadByte(0x81);
        LCD_ShowNum(2,1,Second,3);
  while(1)
        {

        }               
}


#include <REGX52.H>
#include"LCD1602.H"
#include"DS1302.H"
void DS1302_WriteByte();

unsigned char Second;

void main()
{
        LCD_Init();
        DS1302_Init();
        LCD_ShowString(1,1,"RTC");
        DS1302_WriteByte(0x80,0x03);
        Second=DS1302_ReadByte(0x81);
        LCD_ShowNum(2,1,Second,3);
  while(1)
        {

        }               
}





回复

使用道具 举报

ID:883242 发表于 2024-1-20 21:34 | 显示全部楼层
void DS1302_WriteByte(void);
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|51黑电子论坛 |51黑电子论坛6群 QQ 管理员QQ:125739409;技术交流QQ群281945664

Powered by 单片机教程网

快速回复 返回顶部 返回列表