diff options
author | Fulup Ar Foll <fulup@iot.bzh> | 2017-11-02 11:58:32 +0100 |
---|---|---|
committer | Ronan Le Martret <ronan.lemartret@iot.bzh> | 2017-11-24 10:37:52 +0100 |
commit | 3e6dbb17336cade4abf270193c164ea60b7b8389 (patch) | |
tree | fbb15fa89b8a98ba5a43565b98cb91c3253b65f3 /ctl-lib/ctl-timer.h | |
parent | 12dc78f18e54b92332ddd33c785b0d1e0352410b (diff) |
Modifiy timer to supper DynAPI
th Please enter the commit message for your changes. Lines starting
Signed-off-by: Ronan Le Martret <ronan.lemartret@iot.bzh>
Diffstat (limited to 'ctl-lib/ctl-timer.h')
-rw-r--r-- | ctl-lib/ctl-timer.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ctl-lib/ctl-timer.h b/ctl-lib/ctl-timer.h index 6256dcc..333f172 100644 --- a/ctl-lib/ctl-timer.h +++ b/ctl-lib/ctl-timer.h @@ -23,7 +23,6 @@ // ctl-timer.c // ---------------------- -typedef int (*timerCallbackT)(void *context); typedef struct TimerHandleS { int magic; @@ -31,12 +30,14 @@ typedef struct TimerHandleS { int delay; const char*uid; void *context; - timerCallbackT callback; sd_event_source *evtSource; AFB_ApiT api; - timerCallbackT freeCB; + int (*callback) (struct TimerHandleS *handle); + int (*freeCB) (void *context) ; } TimerHandleT; +typedef int (*timerCallbackT)(TimerHandleT *context); + PUBLIC int TimerEvtInit (AFB_ApiT apiHandle); PUBLIC void TimerEvtStart(AFB_ApiT apiHandle, TimerHandleT *timerHandle, timerCallbackT callback, void *context); PUBLIC void TimerEvtStop(TimerHandleT *timerHandle); |