dpl_callout.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2020 Inria
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
23 #ifndef DPL_DPL_CALLOUT_H
24 #define DPL_DPL_CALLOUT_H
25 
26 #include "xtimer.h"
27 
28 #include "dpl/dpl_types.h"
29 #include "dpl/dpl_eventq.h"
30 #include "dpl/dpl_error.h"
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
39 struct dpl_callout {
41  struct dpl_event c_e;
42  struct dpl_eventq *c_q;
43 };
44 
59 void dpl_callout_init(struct dpl_callout *c, struct dpl_eventq *q,
60  dpl_event_fn *e_cb, void *e_arg);
61 
71 
77 void dpl_callout_stop(struct dpl_callout *c);
78 
79 #ifdef __cplusplus
80 }
81 #endif
82 
83 #endif /* DPL_DPL_CALLOUT_H */
dpl_error.h
uwb-core DPL (Decawave Porting Layer) error types
dpl_callout::timer
xtimer_t timer
timer
Definition: dpl_callout.h:40
xtimer
xtimer timer structure
Definition: xtimer.h:81
dpl_callout
callout structure
Definition: dpl_callout.h:39
dpl_event_fn
void dpl_event_fn(struct dpl_event *ev)
dpl event callback function
Definition: dpl_eventq.h:52
dpl_callout_stop
void dpl_callout_stop(struct dpl_callout *c)
Stops the callout from firing.
dpl_callout_init
void dpl_callout_init(struct dpl_callout *c, struct dpl_eventq *q, dpl_event_fn *e_cb, void *e_arg)
Initialize a callout.
dpl_event
dpl event wrapper
Definition: dpl_eventq.h:35
dpl_callout::c_e
struct dpl_event c_e
callout event
Definition: dpl_callout.h:41
dpl_eventq::q
event_queue_t q
the event queue
Definition: dpl_eventq.h:46
dpl_time_t
uint32_t dpl_time_t
dpl time type
Definition: dpl_types.h:55
dpl_callout_reset
dpl_error_t dpl_callout_reset(struct dpl_callout *c, dpl_time_t ticks)
Reset the callout to fire off in 'ticks' ticks.
dpl_callout::c_q
struct dpl_eventq * c_q
callout event queue
Definition: dpl_callout.h:42
dpl_eventq.h
uwb-core DPL (Decawave Porting Layer) event queue wrappers
dpl_eventq
dpl event queue wrapper
Definition: dpl_eventq.h:44
dpl_error_t
enum dpl_error dpl_error_t
dep error type
Definition: dpl_error.h:49
dpl_types.h
uwb-core DPL (Decawave Porting Layer) types
xtimer.h
xtimer interface definitions