event/timeout.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Kaspar Schleiser <kaspar@schleiser.de>
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 
35 #ifndef EVENT_TIMEOUT_H
36 #define EVENT_TIMEOUT_H
37 
38 #include "event.h"
39 #include "xtimer.h"
40 
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44 
48 typedef struct {
53 
61 void event_timeout_init(event_timeout_t *event_timeout, event_queue_t *queue, event_t *event);
62 
75 void event_timeout_set(event_timeout_t *event_timeout, uint32_t timeout);
76 
77 #ifdef __cplusplus
78 }
79 #endif
80 #endif /* EVENT_TIMEOUT_H */
81 
event_queue_t * queue
event queue to post event to
Definition: event/timeout.h:50
event structure
Definition: event.h:127
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:135
event_t * event
event to post after timeout
Definition: event/timeout.h:51
Event API.
xtimer_t timer
xtimer object used for timeout
Definition: event/timeout.h:49
xtimer timer structure
Definition: xtimer.h:70
Timeout Event structure.
Definition: event/timeout.h:48
void event_timeout_set(event_timeout_t *event_timeout, uint32_t timeout)
Set a timeout.