|
ESP-IDF Firmware
Firmware architecture and call graph
|
#include "sdkconfig.h"#include "freertos/FreeRTOS.h"#include "freertos/task.h"#include "esp_log.h"#include "esp_check.h"#include "tinyusb.h"#include "tusb_tasks.h"Go to the source code of this file.
Functions | |
| static void | tusb_device_task (void *arg) |
| This top level thread processes all usb events and invokes callbacks. | |
| esp_err_t | tusb_run_task (void) |
| This helper function creates and starts a task which wraps tud_task(). | |
| esp_err_t | tusb_stop_task (void) |
| This helper function stops and destroys the task created by tusb_run_task(). | |
Variables | |
| static const char * | TAG = "tusb_tsk" |
| static TaskHandle_t | s_tusb_tskh |
|
static |
This top level thread processes all usb events and invokes callbacks.
Definition at line 21 of file tusb_tasks.c.
Referenced by tusb_run_task().
| esp_err_t tusb_run_task | ( | void | ) |
This helper function creates and starts a task which wraps tud_task().
The wrapper function basically wraps tud_task and some log. Default parameters: stack size and priority as configured, argument = NULL, not pinned to any core. If you have more requirements for this task, you can create your own task which calls tud_task as the last step.
| ESP_OK | run tinyusb main task successfully |
| ESP_FAIL | run tinyusb main task failed of internal error |
| ESP_ERR_INVALID_STATE | tinyusb main task has been created before |
Definition at line 29 of file tusb_tasks.c.
References ESP_OK, s_tusb_tskh, TAG, and tusb_device_task().
Referenced by tinyusb_driver_install().
| esp_err_t tusb_stop_task | ( | void | ) |
This helper function stops and destroys the task created by tusb_run_task().
| ESP_OK | stop and destory tinyusb main task successfully |
| ESP_ERR_INVALID_STATE | tinyusb main task hasn't been created yet |
Definition at line 40 of file tusb_tasks.c.
References ESP_OK, s_tusb_tskh, and TAG.
|
static |
Definition at line 16 of file tusb_tasks.c.
Referenced by tusb_run_task(), and tusb_stop_task().
|
static |
Definition at line 15 of file tusb_tasks.c.