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 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
22 typedef void* TimerHandle_t;
23 typedef void (*TimerCallbackFunction_t)(void*);
24 #define tmrTIMER_CALLBACK TimerCallbackFunction_t
25 
26 TimerHandle_t xTimerCreate (const char * const pcTimerName,
27  const TickType_t xTimerPeriod,
28  const UBaseType_t uxAutoReload,
29  void * const pvTimerID,
30  TimerCallbackFunction_t pxCallbackFunction);
31 BaseType_t xTimerDelete(TimerHandle_t xTimer, TickType_t xBlockTime);
32 BaseType_t xTimerStart (TimerHandle_t xTimer, TickType_t xBlockTime);
33 BaseType_t xTimerStop (TimerHandle_t xTimer, TickType_t xBlockTime);
34 BaseType_t xTimerReset (TimerHandle_t xTimer, TickType_t xTicksToWait);
35 
36 void *pvTimerGetTimerID(const TimerHandle_t xTimer);
37 
38 #ifdef __cplusplus
39 }
40 #endif
41 
42 #endif /* DOXYGEN */
43 #endif /* FREERTOS_TIMERS_H */