Loading...
Searching...
No Matches

uwb-core DPL (Decawave Porting Layer) callout abstraction More...

Detailed Description

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.

Author
Francisco Molina franc.nosp@m.ois-.nosp@m.xavie.nosp@m.r.mo.nosp@m.lina@.nosp@m.inri.nosp@m.a.fr

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.
 
static dpl_error_t dpl_callout_reset (struct dpl_callout *c, dpl_time_t ticks)
 Reset the callout to fire off in 'ticks' ticks.
 
static void dpl_callout_stop (struct dpl_callout *c)
 Stops the callout from firing.
 

Function Documentation

◆ dpl_callout_init()

static void dpl_callout_init ( struct dpl_callout c,
struct dpl_eventq q,
dpl_event_fn e_cb,
void *  e_arg 
)
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.

Parameters
[out]ccallout to initialize
[in]qevent queue to queue event in
[in]e_cbcallback function
[in]e_argcallback function argument

Definition at line 53 of file dpl_callout.h.

◆ dpl_callout_reset()

static dpl_error_t dpl_callout_reset ( struct dpl_callout c,
dpl_time_t  ticks 
)
inlinestatic

Reset the callout to fire off in 'ticks' ticks.

Parameters
[in]ccallout to reset
[in]ticksnumber of ticks to wait before posting an event
Returns
0 on success, non-zero on failure

Definition at line 67 of file dpl_callout.h.

◆ dpl_callout_stop()

static void dpl_callout_stop ( struct dpl_callout c)
inlinestatic

Stops the callout from firing.

Parameters
[in]cthe callout to stop

Definition at line 77 of file dpl_callout.h.