uwb-core DPL (Decawave Porting Layer) callout abstraction More...
uwb-core DPL (Decawave Porting Layer) callout abstraction
Callout sets a timer that on expiration will post an event to an event queue. This mimics the same as MyNewt callout api.
Definition in file dpl_callout.h.
#include "os/os_callout.h"
Include dependency graph for dpl_callout.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Data Structures | |
| struct | dpl_callout |
| dpl callout wrapper More... | |
Functions | |
| static void | dpl_callout_init (struct dpl_callout *c, struct dpl_eventq *q, dpl_event_fn *e_cb, void *e_arg) |
| Initialize a callout. More... | |
| static dpl_error_t | dpl_callout_reset (struct dpl_callout *c, dpl_time_t ticks) |
| Reset the callout to fire off in 'ticks' ticks. More... | |
| static void | dpl_callout_stop (struct dpl_callout *c) |
| Stops the callout from firing. More... | |
|
inlinestatic |
Initialize a callout.
Callouts are used to schedule events in the future onto an event queue. Callout timers are scheduled using the dpl_callout_reset() function. When the timer expires, an event is posted to the event queue specified in dpl_callout_init(). The event argument given here is posted in the ev_arg field of that event.
| [out] | c | callout to initialize |
| [in] | q | event queue to queue event in |
| [in] | e_cb | callback function |
| [in] | e_arg | callback function argument |
Definition at line 52 of file dpl_callout.h.
|
inlinestatic |
Reset the callout to fire off in 'ticks' ticks.
| [in] | c | callout to reset |
| [in] | ticks | number of ticks to wait before posting an event |
Definition at line 66 of file dpl_callout.h.
|
inlinestatic |
Stops the callout from firing.
| [in] | c | the callout to stop |
Definition at line 76 of file dpl_callout.h.