🆕 rtc时钟驱动程序

This commit is contained in:
fslongjin
2022-04-08 00:10:02 +08:00
parent 279de4c7f9
commit 401df84d51
4 changed files with 90 additions and 3 deletions

View File

@ -0,0 +1,20 @@
#pragma once
#include <common/glib.h>
struct time
{
int second;
int minute;
int hour;
int day;
int month;
int year;
};
/**
* @brief 从主板cmos中获取时间
*
* @param t time结构体
* @return int 成功则为0
*/
int rtc_get_cmos_time(struct time*t);
int get_cmos_time(struct time *time);