mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-06 14:14:33 +02:00
tusb: optional compile tusb_task
This commit is contained in:
@@ -53,10 +53,13 @@ if(CONFIG_TINYUSB)
|
|||||||
"tinyusb/src/tusb.c"
|
"tinyusb/src/tusb.c"
|
||||||
"additions/src/descriptors_control.c"
|
"additions/src/descriptors_control.c"
|
||||||
"additions/src/tinyusb.c"
|
"additions/src/tinyusb.c"
|
||||||
"additions/src/tusb_tasks.c"
|
|
||||||
"additions/src/usb_descriptors.c"
|
"additions/src/usb_descriptors.c"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if(NOT CONFIG_TINYUSB_NO_DEFAULT_TASK)
|
||||||
|
list(APPEND srcs "additions/src/tusb_tasks.c")
|
||||||
|
endif()
|
||||||
|
|
||||||
# when no builtin class driver is enabled, an uint8_t data compared with `BUILTIN_DRIVER_COUNT` will always be false
|
# when no builtin class driver is enabled, an uint8_t data compared with `BUILTIN_DRIVER_COUNT` will always be false
|
||||||
set_source_files_properties("tinyusb/src/device/usbd.c" PROPERTIES COMPILE_FLAGS "-Wno-type-limits")
|
set_source_files_properties("tinyusb/src/device/usbd.c" PROPERTIES COMPILE_FLAGS "-Wno-type-limits")
|
||||||
|
|
||||||
|
@@ -12,8 +12,6 @@
|
|||||||
#include "tinyusb.h"
|
#include "tinyusb.h"
|
||||||
#include "tusb_tasks.h"
|
#include "tusb_tasks.h"
|
||||||
|
|
||||||
#if !CONFIG_TINYUSB_NO_DEFAULT_TASK
|
|
||||||
|
|
||||||
const static char *TAG = "tusb_tsk";
|
const static char *TAG = "tusb_tsk";
|
||||||
static TaskHandle_t s_tusb_tskh;
|
static TaskHandle_t s_tusb_tskh;
|
||||||
|
|
||||||
@@ -46,5 +44,3 @@ esp_err_t tusb_stop_task(void)
|
|||||||
s_tusb_tskh = NULL;
|
s_tusb_tskh = NULL;
|
||||||
return ESP_OK;
|
return ESP_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // !CONFIG_TINYUSB_NO_DEFAULT_TASK
|
|
||||||
|
Reference in New Issue
Block a user