📄 ds1302.h
字号:
#ifndef __DS1302_H__
#define __DS1302_H__
#include <reg52.h>
sbit DSIO = P3^4;//DS1302 的引脚分配
sbit DSCK = P3^5;
sbit DSRST = P3^3;
#define uchar unsigned char
struct time//时间结构,用结构管理时间
{
uchar sec;
uchar minute;
uchar hour;
uchar date;
uchar month;
uchar week;
uchar year;
};
uchar rt_rbyte();
void rt_reset();
void rt_wbyte(uchar);
void GetTime(struct time *p);
void SetTime(struct time *p);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -