00001 00008 /* 00009 * rtc.h 00010 * 00011 * Created on: 28.04.2010 00012 * Author: Jan Ortner 00013 */ 00014 00015 #ifndef RTC_H_ 00016 #define RTC_H_ 00017 00018 #include <stdint.h> 00019 00030 typedef struct time{ 00031 uint16_t us; 00032 uint16_t ms; 00033 uint16_t mins; 00034 uint16_t hd; 00035 } time_t; 00036 00042 void initRTC(); 00043 00055 int getTimeDiff(time_t* t1,time_t* t2,time_t* terg); 00056 00063 void getCurrentTime(time_t* t); 00064 00065 00066 #endif /* RTC_H_ */