00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00016 #ifndef __INCLUDE_TIME_H
00017 #define __INCLUDE_TIME_H
00018 extern volatile uint32_t jiffies;
00019
00020 #define TIME_DEFAULT_YEAR 2007
00021 #define TIME_DEFAULT_MONTH 6
00022 #define TIME_DEFAULT_DAY 1
00023 #define TIME_DEFAULT_HOUR 12
00024 #define TIME_DEFAULT_MIN 0
00025 #define TIME_DEFAULT_SEC 0
00026
00027
00030 typedef struct
00031 {
00032 uint16_t year;
00033 uint8_t month;
00034 uint8_t day;
00035 uint8_t hour;
00036 uint8_t min;
00037 uint8_t sec;
00038 } TIME_date_t;
00039
00044 void TIME_init ();
00045
00051 void TIME_setDate (const TIME_date_t *date);
00052
00058 void TIME_getDate (TIME_date_t *const date);
00059
00065 void mdelay (uint32_t milliseconds);
00066
00072 void delay (uint32_t seconds);
00073
00074 #endif // __INCLUDE_TIME_H