diff options
author | Fulup Ar Foll <fulup@iot.bzh> | 2017-11-02 11:58:32 +0100 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2018-12-13 15:02:54 +0100 |
commit | 5ea27091ffd08d0c9cb9368d274bd0998fd89a77 (patch) | |
tree | fbb15fa89b8a98ba5a43565b98cb91c3253b65f3 /ctl-lib/ctl-timer.h | |
parent | f90b319be45e0fc16b608e2c0639648180d3af76 (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); |