Loading...
Searching...
No Matches
FreeRTOS.h
1/*
2 * SPDX-FileCopyrightText: 2019 Gunar Schorcht
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6/*
7 * FreeRTOS to RIOT-OS adaption module for source code compatibility
8 */
9
10#pragma once
11
12#ifndef DOXYGEN
13
14#include "freertos/portmacro.h"
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
20#define configTASK_NOTIFICATION_ARRAY_ENTRIES 1
21#define configMAX_PRIORITIES SCHED_PRIO_LEVELS
22
23#ifndef configSTACK_DEPTH_TYPE
24#define configSTACK_DEPTH_TYPE uint32_t
25#endif
26
27#ifndef configASSERT
28#define configASSERT assert
29#endif
30
31#define configTICK_RATE_HZ ((TickType_t)100)
32
33#define portTICK_PERIOD_MS 10
34#define portTICK_RATE_MS portTICK_PERIOD_MS
35
36#define BaseType_t portBASE_TYPE
37#define UBaseType_t portUBASE_TYPE
38#define TickType_t portTICK_TYPE
39#define StackType_t portSTACK_TYPE
40
41#define portTickType TickType_t
42
43#define pdMS_TO_TICKS(ms) ((TickType_t)(ms / portTICK_PERIOD_MS))
44
45#define xSemaphoreHandle SemaphoreHandle_t
46
47typedef void (* TaskFunction_t)( void * );
48
49uint32_t xPortGetTickRateHz(void);
50BaseType_t xPortInIsrContext(void);
51
52UBaseType_t xPortSetInterruptMaskFromISR(void);
53void vPortClearInterruptMaskFromISR(UBaseType_t state);
54
55/*
56 * PLEASE NOTE: Following definitions were copied directly from the FreeRTOS
57 * distribution and are under the following copyright:
58 *
59 * FreeRTOS V8.2.0 - Copyright (C) 2015 Real Time Engineers Ltd.
60 * All rights reserved
61 *
62 * FreeRTOS is free software; you can redistribute it and/or modify it under
63 * the terms of the GNU General Public License (version 2) as published by the
64 * Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.
65 *
66 * Full license text is available on the following
67 * link: http://www.freertos.org/a00114.html
68 */
69
70#define pdFALSE ( ( BaseType_t ) 0 )
71#define pdTRUE ( ( BaseType_t ) 1 )
72#define pdPASS ( pdTRUE )
73#define pdFAIL ( pdFALSE )
74
75#ifdef __cplusplus
76}
77#endif
78
79#include "freertos/semphr.h"
80#include "freertos/queue.h"
81
82#endif /* DOXYGEN */