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