Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
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
{
51
xtimer_t
timer
;
52
event_queue_t
*
queue
;
53
event_t
*
event
;
54
}
event_timeout_t
;
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
xtimer
xtimer timer structure
Definition:
xtimer.h:81
event_timeout_t
Timeout Event structure.
Definition:
timeout.h:50
event_timeout_t::event
event_t * event
event to post after timeout
Definition:
timeout.h:53
event_timeout_t::timer
xtimer_t timer
xtimer object used for timeout
Definition:
timeout.h:51
event
event structure
Definition:
event.h:142
event_queue_t
event queue structure
Definition:
event.h:150
event_timeout_init
void event_timeout_init(event_timeout_t *event_timeout, event_queue_t *queue, event_t *event)
Initialize timeout event object.
event_timeout_t::queue
event_queue_t * queue
event queue to post event to
Definition:
timeout.h:52
event_timeout_clear
void event_timeout_clear(event_timeout_t *event_timeout)
Clear a timeout event.
event_timeout_set
void event_timeout_set(event_timeout_t *event_timeout, uint32_t timeout)
Set a timeout.
xtimer.h
xtimer interface definitions
Generated on Tue Nov 24 2020 19:46:52 by
1.8.17