Major refactor of RTC-related code

This commit is contained in:
2020-11-20 11:16:02 +01:00
parent ffdd2beb35
commit 20663bbc13
12 changed files with 264 additions and 114 deletions

View File

@@ -1,6 +1,23 @@
#ifndef __TIME_H__
#define __TIME_H__
#define TIME_2_INT(TIME) ((TIME).hour*60 + (TIME).minute)
struct DATE_YMDW
{
uint16_t year;
uint8_t month;
uint8_t day;
uint8_t weekday;
};
struct DATE_YMD
{
uint16_t year;
uint8_t month;
uint8_t day;
};
struct TIME_HMS
{
uint8_t hour;