summaryrefslogtreecommitdiffstats
path: root/ctl-lib/ctl-timer.h
diff options
context:
space:
mode:
authorfulup <fulup.arfoll@iot.bzh>2017-10-18 11:31:33 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2018-12-13 15:02:54 +0100
commit2b77a50d5c578d92ac692b872f5a51c227c29334 (patch)
tree262f653a0369d080e2368bddd840e3c0fa089b29 /ctl-lib/ctl-timer.h
parent2da9781ef4b8c68b22a9a45aaa60c6e5b1e1142d (diff)
1st V2/pre-V3 version
Diffstat (limited to 'ctl-lib/ctl-timer.h')
-rw-r--r--ctl-lib/ctl-timer.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/ctl-lib/ctl-timer.h b/ctl-lib/ctl-timer.h
index b08299f..ced0417 100644
--- a/ctl-lib/ctl-timer.h
+++ b/ctl-lib/ctl-timer.h
@@ -26,17 +26,19 @@
typedef int (*timerCallbackT)(void *context);
typedef struct TimerHandleS {
+ int magic;
int count;
int delay;
const char*label;
void *context;
timerCallbackT callback;
sd_event_source *evtSource;
+ AFB_ApiT api;
+ timerCallbackT freeCB;
} TimerHandleT;
-PUBLIC int TimerEvtInit (void);
-PUBLIC afb_event TimerEvtGet(void);
-PUBLIC void TimerEvtStart(TimerHandleT *timerHandle, timerCallbackT callback, void *context);
+PUBLIC int TimerEvtInit (AFB_ApiT apiHandle);
+PUBLIC void TimerEvtStart(AFB_ApiT apiHandle, TimerHandleT *timerHandle, timerCallbackT callback, void *context);
PUBLIC void TimerEvtStop(TimerHandleT *timerHandle);
#endif // CTL_TIMER_INCLUDE