Merge pull request #1108 from hathach/minor-changes

make freertos header include in examples more explicit
This commit is contained in:
Ha Thach 2021-09-26 13:12:05 +07:00 committed by GitHub
commit 8f0cfc8d44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 14 deletions

View File

@ -30,13 +30,21 @@
#include "bsp/board.h" #include "bsp/board.h"
#include "tusb.h" #include "tusb.h"
// FreeRTOS headers, MCUs such as esp32sx requires "freertos/" prefix in include path. #if TU_CHECK_MCU(ESP32S2) || TU_CHECK_MCU(ESP32S3)
// CFG_TUSB_OS_INC_PATH should be defined accordingly. // ESP-IDF need "freertos/" prefix in include path.
#include TU_INCLUDE_PATH(CFG_TUSB_OS_INC_PATH,FreeRTOS.h) // CFG_TUSB_OS_INC_PATH should be defined accordingly.
#include TU_INCLUDE_PATH(CFG_TUSB_OS_INC_PATH,semphr.h) #include "freertos/FreeRTOS.h"
#include TU_INCLUDE_PATH(CFG_TUSB_OS_INC_PATH,queue.h) #include "freertos/semphr.h"
#include TU_INCLUDE_PATH(CFG_TUSB_OS_INC_PATH,task.h) #include "freertos/queue.h"
#include TU_INCLUDE_PATH(CFG_TUSB_OS_INC_PATH,timers.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 // MACRO CONSTANT TYPEDEF PROTYPES

View File

@ -31,13 +31,21 @@
#include "tusb.h" #include "tusb.h"
#include "usb_descriptors.h" #include "usb_descriptors.h"
// FreeRTOS headers, MCUs such as esp32sx requires "freertos/" prefix in include path. #if TU_CHECK_MCU(ESP32S2) || TU_CHECK_MCU(ESP32S3)
// CFG_TUSB_OS_INC_PATH should be defined accordingly. // ESP-IDF need "freertos/" prefix in include path.
#include TU_INCLUDE_PATH(CFG_TUSB_OS_INC_PATH,FreeRTOS.h) // CFG_TUSB_OS_INC_PATH should be defined accordingly.
#include TU_INCLUDE_PATH(CFG_TUSB_OS_INC_PATH,semphr.h) #include "freertos/FreeRTOS.h"
#include TU_INCLUDE_PATH(CFG_TUSB_OS_INC_PATH,queue.h) #include "freertos/semphr.h"
#include TU_INCLUDE_PATH(CFG_TUSB_OS_INC_PATH,task.h) #include "freertos/queue.h"
#include TU_INCLUDE_PATH(CFG_TUSB_OS_INC_PATH,timers.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 // MACRO CONSTANT TYPEDEF PROTYPES