-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrtc_alarm.h
38 lines (32 loc) · 851 Bytes
/
rtc_alarm.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
/*
* rtc_alarm.h
*
* Created on: 2013年10月22日
* Author: qinbh
*/
#ifndef RTC_ALARM_H_
#define RTC_ALARM_H_
#include <linux/rtc.h>
#include <time.h>
#include "list.h"
struct rtc_alarm_dev {
time_t expect;
int repeat;
volatile int interval;
void * (*func)(void *);
struct list_head list;
};
extern struct rtc_alarm_dev sample_dev;
extern struct rtc_alarm_dev sample_dev_1;
extern struct rtc_alarm_dev sample_dev_2;
extern struct rtc_alarm_dev camera_dev;
void rtc_trigger_alarm(time_t cur_time);
int rtc_alarm_init(void);
int rtc_alarm_update(void);
int rtc_alarm_add(struct rtc_alarm_dev *timer);
int rtc_alarm_del(struct rtc_alarm_dev *timer);
int rtc_alarm_isActive(struct rtc_alarm_dev *timer);
time_t rtc_get_time(void);
int rtc_set_time(struct tm *rtc_tm);
time_t mktime_k(struct tm *tm);
#endif /* RTC_ALARM_H_ */