summaryrefslogtreecommitdiff
path: root/examples/device
diff options
context:
space:
mode:
authorhathach <[email protected]>2021-09-26 12:23:08 +0700
committerhathach <[email protected]>2021-09-26 12:23:08 +0700
commitfba5ec813423b3e3e0f08c5c54e40143a9632e4e (patch)
tree26e3376ce030d6159b85b2989786a5bfe927aeed /examples/device
parent958cf2cfbaf1ddb67f31ff5920630304189d7c0c (diff)
make freertos header include in examples more explicit
Diffstat (limited to 'examples/device')
-rw-r--r--examples/device/cdc_msc_freertos/src/main.c22
-rw-r--r--examples/device/hid_composite_freertos/src/main.c22
2 files changed, 30 insertions, 14 deletions
diff --git a/examples/device/cdc_msc_freertos/src/main.c b/examples/device/cdc_msc_freertos/src/main.c
index af00b3cc2..65b7fda3b 100644
--- a/examples/device/cdc_msc_freertos/src/main.c
+++ b/examples/device/cdc_msc_freertos/src/main.c
@@ -30,13 +30,21 @@
#include "bsp/board.h"
#include "tusb.h"
-// FreeRTOS headers, MCUs such as esp32sx requires "freertos/" prefix in include path.
-// CFG_TUSB_OS_INC_PATH should be defined accordingly.
-#include TU_INCLUDE_PATH(CFG_TUSB_OS_INC_PATH,FreeRTOS.h)
-#include TU_INCLUDE_PATH(CFG_TUSB_OS_INC_PATH,semphr.h)
-#include TU_INCLUDE_PATH(CFG_TUSB_OS_INC_PATH,queue.h)
-#include TU_INCLUDE_PATH(CFG_TUSB_OS_INC_PATH,task.h)
-#include TU_INCLUDE_PATH(CFG_TUSB_OS_INC_PATH,timers.h)
+#if TU_CHECK_MCU(ESP32S2) || TU_CHECK_MCU(ESP32S3)
+ // ESP-IDF need "freertos/" prefix in include path.
+ // CFG_TUSB_OS_INC_PATH should be defined accordingly.
+ #include "freertos/FreeRTOS.h"
+ #include "freertos/semphr.h"
+ #include "freertos/queue.h"
+ #include "freertos/task.h"
+ #include "freertos/timers.h"
+#else
+ #include "FreeRTOS.h"
+ #include "semphr.h"
+ #include "queue.h"
+ #include "task.h"
+ #include "timers.h"
+#endif
//--------------------------------------------------------------------+
// MACRO CONSTANT TYPEDEF PROTYPES
diff --git a/examples/device/hid_composite_freertos/src/main.c b/examples/device/hid_composite_freertos/src/main.c
index 8a184f60f..b25c71f64 100644
--- a/examples/device/hid_composite_freertos/src/main.c
+++ b/examples/device/hid_composite_freertos/src/main.c
@@ -31,13 +31,21 @@
#include "tusb.h"
#include "usb_descriptors.h"
-// FreeRTOS headers, MCUs such as esp32sx requires "freertos/" prefix in include path.
-// CFG_TUSB_OS_INC_PATH should be defined accordingly.
-#include TU_INCLUDE_PATH(CFG_TUSB_OS_INC_PATH,FreeRTOS.h)
-#include TU_INCLUDE_PATH(CFG_TUSB_OS_INC_PATH,semphr.h)
-#include TU_INCLUDE_PATH(CFG_TUSB_OS_INC_PATH,queue.h)
-#include TU_INCLUDE_PATH(CFG_TUSB_OS_INC_PATH,task.h)
-#include TU_INCLUDE_PATH(CFG_TUSB_OS_INC_PATH,timers.h)
+#if TU_CHECK_MCU(ESP32S2) || TU_CHECK_MCU(ESP32S3)
+ // ESP-IDF need "freertos/" prefix in include path.
+ // CFG_TUSB_OS_INC_PATH should be defined accordingly.
+ #include "freertos/FreeRTOS.h"
+ #include "freertos/semphr.h"
+ #include "freertos/queue.h"
+ #include "freertos/task.h"
+ #include "freertos/timers.h"
+#else
+ #include "FreeRTOS.h"
+ #include "semphr.h"
+ #include "queue.h"
+ #include "task.h"
+ #include "timers.h"
+#endif
//--------------------------------------------------------------------+
// MACRO CONSTANT TYPEDEF PROTYPES