Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef RTC_H
00019 #define RTC_H
00020
00024 #ifdef HAVE_STDINT_H
00025 #include <stdint.h>
00026 #endif
00027 #include <avr/io.h>
00028
00040 void hl_rtc_init_osc (void);
00041
00048 void hl_rtc_init (void);
00049
00053 void hl_sleep_for_tick (uint16_t ms);
00054
00056 #define F_RTC_OSC (32768)
00057
00060 typedef struct hl_time_s {
00061 uint32_t seconds;
00062 uint32_t useconds;
00063 uint16_t ticks;
00064 } hl_time_t;
00065
00067 hl_time_t hl_get_current_time (void);
00068
00070 uint16_t hl_get_timer_ticks (void);
00071
00079 inline void hl_wakeup_memory (void)
00080 {
00081 XMCRB &= ~_BV(XMM1);
00082 }
00083
00084 #endif