zephyr
This commit is contained in:
@@ -38,22 +38,24 @@ extern "C" {
|
||||
|
||||
#include "tusb.h"
|
||||
|
||||
#if CFG_TUSB_OS == OPT_OS_FREERTOS
|
||||
#if TUSB_MCU_VENDOR_ESPRESSIF
|
||||
// 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
|
||||
#if CFG_TUSB_OS == OPT_OS_ZEPHYR
|
||||
#include <zephyr/kernel.h>
|
||||
#elif CFG_TUSB_OS == OPT_OS_FREERTOS
|
||||
#if TUSB_MCU_VENDOR_ESPRESSIF
|
||||
// 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
|
||||
@@ -124,6 +126,10 @@ static inline uint32_t board_millis(void) {
|
||||
// Implement your own board_millis() in any of .c file
|
||||
uint32_t board_millis(void);
|
||||
|
||||
#elif CFG_TUSB_OS == OPT_OS_ZEPHYR
|
||||
static inline uint32_t board_millis(void) {
|
||||
return k_uptime_get_32();
|
||||
}
|
||||
#else
|
||||
#error "board_millis() is not implemented for this OS"
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user