AVR library
time.h
1 #ifndef MAT_TIME_H
2 #define MAT_TIME_H
3 
4 #include <inttypes.h>
5 
6 struct rtc_t
7 {
8  uint8_t sec;
9  uint8_t min;
10  uint8_t hr;
11  uint8_t day;
12  uint8_t mon;
13  uint8_t yr;
14 };
15 
16 uint32_t rtc_mktime(const struct rtc_t* t);
17 uint8_t rtc_timevalid(const struct rtc_t* t);
18 void rtc_inct(struct rtc_t* t);
19 
20 #endif
uint32_t rtc_mktime(const struct rtc_t *t)
Convert rtc_t to unix time.
Definition: time.c:36
uint8_t mon
Definition: time.h:12
uint8_t sec
Definition: time.h:8
Definition: time.h:6
uint8_t hr
Definition: time.h:10
uint8_t yr
Definition: time.h:13
void rtc_inct(struct rtc_t *t)
Increase rtc_t by 1 second.
Definition: time.c:75
uint8_t min
Definition: time.h:9
uint8_t day
Definition: time.h:11