timers.h
1 /*
2  * Copyright (C) 2019 Gunar Schorcht
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  * FreeRTOS to RIOT-OS adaption module for source code compatibility
9  */
10 
11 #ifndef FREERTOS_TIMERS_H
12 #define FREERTOS_TIMERS_H
13 
14 #ifndef DOXYGEN
15 
16 #include "freertos/FreeRTOS.h"
17 #include "xtimer.h"
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
23 typedef void* TimerHandle_t;
24 
25 #define TimerCallbackFunction_t xtimer_callback_t
26 #define tmrTIMER_CALLBACK TimerCallbackFunction_t
27 
28 TimerHandle_t xTimerCreate (const char * const pcTimerName,
29  const TickType_t xTimerPeriod,
30  const UBaseType_t uxAutoReload,
31  void * const pvTimerID,
32  TimerCallbackFunction_t pxCallbackFunction);
33 BaseType_t xTimerDelete(TimerHandle_t xTimer, TickType_t xBlockTime);
34 BaseType_t xTimerStart (TimerHandle_t xTimer, TickType_t xBlockTime);
35 BaseType_t xTimerStop (TimerHandle_t xTimer, TickType_t xBlockTime);
36 BaseType_t xTimerReset (TimerHandle_t xTimer, TickType_t xTicksToWait);
37 
38 void *pvTimerGetTimerID(const TimerHandle_t xTimer);
39 
40 #ifdef __cplusplus
41 }
42 #endif
43 
44 #endif /* DOXYGEN */
45 #endif /* FREERTOS_TIMERS_H */
xtimer.h
xtimer interface definitions