summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorhathach <[email protected]>2024-01-29 23:23:06 +0700
committerhathach <[email protected]>2024-01-29 23:23:06 +0700
commit55950656cbee915662a9a33477ddd549489ffcf0 (patch)
tree71a66c714ef95ae3e019781671fddad937d3d62f /hw
parentd52909ec5caae5413758eeb169e68c82c7588f3d (diff)
add freertos build support for video_capture example
Diffstat (limited to 'hw')
-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