summaryrefslogtreecommitdiff
path: root/hw/bsp/board_api.h
diff options
context:
space:
mode:
Diffstat (limited to 'hw/bsp/board_api.h')
-rw-r--r--hw/bsp/board_api.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/hw/bsp/board_api.h b/hw/bsp/board_api.h
index 404509a28..0c8a35924 100644
--- a/hw/bsp/board_api.h
+++ b/hw/bsp/board_api.h
@@ -33,9 +33,26 @@ extern "C" {
#include <stdint.h>
#include <stdbool.h>
-
#include "tusb.h"
+#if CFG_TUSB_OS == OPT_OS_FREERTOS
+#if TU_CHECK_MCU(OPT_MCU_ESP32S2, OPT_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
+#endif
+
// Define the default baudrate
#ifndef CFG_BOARD_UART_BAUDRATE
#define CFG_BOARD_UART_BAUDRATE 115200 ///< Default baud rate