-
Notifications
You must be signed in to change notification settings - Fork 1
/
RTClock.h
41 lines (23 loc) · 839 Bytes
/
RTClock.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#include "utility/rtc_util.h"
#include <time.h>
#ifndef _RTCLOCK_H_
#define _RTCLOCK_H_
class RTClock {
public:
RTClock();
RTClock(rtc_clk_src src );
RTClock(rtc_clk_src src, uint16 prescaler );
//~RTClock(); //to implement
void setTime (time_t time_stamp);
void setTime (struct tm * tm_ptr);
struct tm* getTime(struct tm* tm_ptr);
time_t getTime();
void createAlarm(voidFuncPtr function, time_t alarm_time_t);
void createAlarm(voidFuncPtr function, struct tm* alarm_tm);
void attachSecondsInterrupt(voidFuncPtr function);
void detachSecondsInterrupt();
void setAlarmTime (tm * tm_ptr);
void setAlarmTime (time_t alarm_time);
//private:
} ;
#endif // _RTCLOCK_H_