Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
esp-idf/freertos_includes.h
Go to the documentation of this file.
1
35
#ifdef ESP_PLATFORM
36
37
#include <freertos/FreeRTOS.h>
38
#include <freertos/task.h>
39
#include <freertos/semphr.h>
40
#include "sdkconfig.h"
41
42
#define NSEC_TO_TICK(ns) \
43
(((((long long)(ns)) / 1000 * configTICK_RATE_HZ) + 999999) / 1000000)
44
45
// IDF v5.0 has introduced a configuration option (disabled by default) which
46
// enables the usage of legacy FreeRTOS data types, if that configuration option
47
// is *NOT* selected *AND* IDF v5.0+ is in use we need to add compatibility
48
// defines in order to compile OpenMRN successfully.
49
#if !defined(CONFIG_FREERTOS_ENABLE_BACKWARD_COMPATIBILITY)
50
51
// used in os/os.c and os/os.h
52
#define portTickType TickType_t
53
#define xTaskHandle TaskHandle_t
54
#define xQueueHandle QueueHandle_t
55
#define xSemaphoreHandle SemaphoreHandle_t
56
57
// used in freertos_drivers/arduino/CpuLoad.hxx and os/os.c
58
#define pcTaskGetTaskName pcTaskGetName
59
60
#endif
// IDF v5.0+ and !CONFIG_FREERTOS_ENABLE_BACKWARD_COMPATIBILITY
61
62
#else
63
64
#include <FreeRTOS.h>
65
#include <task.h>
66
#include <semphr.h>
67
68
#define NSEC_TO_TICK(ns) ((ns) >> NSEC_TO_TICK_SHIFT)
69
70
#endif
include
esp-idf
freertos_includes.h
Generated on Sun Feb 2 2025 21:18:13 for Open Model Railroad Network (OpenMRN) by
1.9.8