📄 ht1380.h
字号:
//***************************************************************
// HT1380.c
// By:SG 2004/02/23
//***************************************************************
//----------------------------------------------------------------
// 常量定义
//----------------------------------------------------------------
#define cnWriteSecondCmd 0x80 // 写秒
#define cnReadSecondCmd 0x81 // 读秒
#define cnWriteMinuteCmd 0x82 // 写分
#define cnReadMinuteCmd 0x83 // 读分
#define cnWriteHourCmd 0x84 // 写小时
#define cnReadHourCmd 0x85 // 读小时
#define cnWriteDateCmd 0x86 // 写日期
#define cnReadDateCmd 0x87 // 读日期
#define cnWriteMonthCmd 0x88 // 写月
#define cnReadMonthCmd 0x89 // 读月
#define cnWriteDayCmd 0x8a // 写星期
#define cnReadDayCmd 0x8b // 读星期
#define cnWriteYearCmd 0x8c // 写年
#define cnReadYearCmd 0x8d // 读年
#define cnWriteWPCmd 0x8e // 写WP命令,WP = Write protect bit
#define cnReadWPCmd 0x8f // 读WP命令,WP = Write protect bit
#define cnWriteCHCmd 0x80 // 写CH命令,CH = Clock halt bit
#define cnWriteTimeCmd 0xbe // 顺序连续写命令
#define cnReadTimeCmd 0xbf // 顺序连续读命令
#define cnEnWriteData 0x00 // 允许写数据
#define cnDisWriteData 0x80 // 禁止写数据
#define cnEnOscData 0x00 // 启动振荡数据
#define cnDisOscData 0x80 // 停振荡器数据
//---------------------------------------------------------------
// 变量申明
//---------------------------------------------------------------
#ifndef Modul_HT1380
#endif
//----------------------------------------------------------------
// 公开的函数
//----------------------------------------------------------------
void HT1380_EnWrite(void); // 允许写入
void HT1380_DisWrite(void); // 禁止写入
void HT1380_EnOsc(void); // 启动振荡器
BYTE HT1380_Read(void); // 从1380读一个字节
void HT1380_Write(BYTE CmdOrData); // 向1380写一个字节
void Timekeeper_ReadTime(void); // Timekeeper.c 读时钟数据
void Timekeeper_WriteTime(void); // Timekeeper.C 写时钟数据
void Timekeeper_Reset(void); // Timekeeper.C 上电重置
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -