timeout.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Inria
3  * 2017 Freie Universit├Ąt Berlin
4  * 2017 Kaspar Schleiser <kaspar@schleiser.de>
5  *
6  * This file is subject to the terms and conditions of the GNU Lesser
7  * General Public License v2.1. See the file LICENSE in the top level
8  * directory for more details.
9  */
10 
37 #ifndef EVENT_TIMEOUT_H
38 #define EVENT_TIMEOUT_H
39 
40 #include "event.h"
41 #include "xtimer.h"
42 
43 #ifdef __cplusplus
44 extern "C" {
45 #endif
46 
50 typedef struct {
55 
63 void event_timeout_init(event_timeout_t *event_timeout, event_queue_t *queue,
64  event_t *event);
65 
78 void event_timeout_set(event_timeout_t *event_timeout, uint32_t timeout);
79 
90 void event_timeout_clear(event_timeout_t *event_timeout);
91 
92 #ifdef __cplusplus
93 }
94 #endif
95 #endif /* EVENT_TIMEOUT_H */
96 
event_queue_t * queue
event queue to post event to
Definition: timeout.h:52
event structure
Definition: event.h:139
void event_timeout_clear(event_timeout_t *event_timeout)
Clear a timeout event.
void event_timeout_init(event_timeout_t *event_timeout, event_queue_t *queue, event_t *event)
Initialize timeout event object.
xtimer interface definitions
event queue structure
Definition: event.h:147
event_t * event
event to post after timeout
Definition: timeout.h:53
Event API.
xtimer_t timer
xtimer object used for timeout
Definition: timeout.h:51
xtimer timer structure
Definition: xtimer.h:74
Timeout Event structure.
Definition: timeout.h:50
void event_timeout_set(event_timeout_t *event_timeout, uint32_t timeout)
Set a timeout.