Get RTC date
This commit is contained in:
21
kernel/time/time.h
Normal file
21
kernel/time/time.h
Normal file
@ -0,0 +1,21 @@
|
||||
#ifndef TIME_TIME_H_
|
||||
#define TIME_TIME_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
typedef struct {
|
||||
uint32_t second;
|
||||
uint32_t minute;
|
||||
uint32_t hour;
|
||||
uint32_t day;
|
||||
uint32_t month;
|
||||
uint32_t year;
|
||||
} Time;
|
||||
|
||||
typedef uint64_t timeunix_t;
|
||||
|
||||
void time_get(Time *time);
|
||||
timeunix_t time_tounix(Time *time);
|
||||
|
||||
#endif // TIME_TIME_H_
|
||||
Reference in New Issue
Block a user