1 Star 1 Fork 0

ischen.x/ds1337_driver

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
DS1337.h 926 Bytes
一键复制 编辑 原始数据 按行查看 历史
ischen.x 提交于 2024-07-29 13:07 . first commit
/*
* @Author: ischen.x ischen.x@foxmail.com
* @Date: 2024-07-11 13:31:52
* @LastEditors: ischen.x ischen.x@foxmail.com
* @LastEditTime: 2024-07-19 15:27:39
*
* Copyright (c) 2024 by ischen.x, All Rights Reserved.
*/
#ifndef __AT1337_H
#define __AT1337_H
#include <stdint.h>
#include <time.h>
#define AT1337_IIC_ADDR 0x64
typedef struct at1337{
uint8_t Seconds;
uint8_t Minutes;
uint8_t Hours;
uint8_t Day;
uint8_t Date;
uint8_t Mounth_Century;
uint8_t year;
uint8_t Alarm_1_Seconds;
uint8_t Alarm_1_Minutes;
uint8_t Alarm_1_Hours;
uint8_t Alarm_1_Day;
uint8_t Alarm_1_Date;
uint8_t Alarm_2_Seconds;
uint8_t Alarm_2_Minutes;
uint8_t Alarm_2_Hours;
uint8_t Alarm_2_Day;
uint8_t Alarm_2_Date;
uint8_t Control;
uint8_t Status;
}at1337_reg_type;
int at1337_get_time(struct tm *time_struct);
int at1337_set_time(struct tm *time_struct);
#endif /* __AT1337_H */
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ischen-x/ds1337_driver.git
git@gitee.com:ischen-x/ds1337_driver.git
ischen-x
ds1337_driver
ds1337_driver
master

搜索帮助