FreeRTOS.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_FREERTOS_H
12 #define FREERTOS_FREERTOS_H
13 
14 #ifndef DOXYGEN
15 
16 #include "freertos/portmacro.h"
17 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
22 #define configMAX_PRIORITIES SCHED_PRIO_LEVELS
23 
24 #ifndef configASSERT
25 #define configASSERT assert
26 #endif
27 
28 #define portTICK_PERIOD_MS 10
29 #define portTickType TickType_t
30 
31 #define portTICK_RATE_MS portTICK_PERIOD_MS
32 
33 #define BaseType_t portBASE_TYPE
34 #define UBaseType_t unsigned portBASE_TYPE
35 
36 typedef uint32_t TickType_t;
37 
38 uint32_t xPortGetTickRateHz(void);
39 BaseType_t xPortInIsrContext(void);
40 
41 /*
42  * PLEASE NOTE: Following definitions were copied directly from the FreeRTOS
43  * distribution and are under the following copyright:
44  *
45  * FreeRTOS V8.2.0 - Copyright (C) 2015 Real Time Engineers Ltd.
46  * All rights reserved
47  *
48  * FreeRTOS is free software; you can redistribute it and/or modify it under
49  * the terms of the GNU General Public License (version 2) as published by the
50  * Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.
51  *
52  * Full license text is available on the following
53  * link: http://www.freertos.org/a00114.html
54  */
55 
56 #define pdFALSE ( ( BaseType_t ) 0 )
57 #define pdTRUE ( ( BaseType_t ) 1 )
58 #define pdPASS ( pdTRUE )
59 #define pdFAIL ( pdFALSE )
60 
61 #ifdef __cplusplus
62 }
63 #endif
64 
65 #include "freertos/semphr.h"
66 #include "freertos/queue.h"
67 
68 #endif /* DOXYGEN */
69 #endif /* FREERTOS_FREERTOS_H */