tusb_tasks.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // Copyright 2020 Espressif Systems (Shanghai) PTE LTD
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. #pragma once
  15. #include "esp_err.h"
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19. /**
  20. * @brief This API starts a task with a wrapper function of tud_task and default task parameters.
  21. *
  22. * The wrapper function basically wraps tud_task and some log. Default parameters: stack size and priority as configured, argument = NULL,
  23. * not pinned to any core.
  24. * If you have more requirements for this task, you can create your own task which calls tud_task as the last step.
  25. *
  26. * @return ESP_OK or ESP_FAIL
  27. */
  28. esp_err_t tusb_run_task(void);
  29. /**
  30. * @brief Stops a FreeRTOS task
  31. *
  32. * @return ESP_OK or ESP_FAIL
  33. */
  34. esp_err_t tusb_stop_task(void);
  35. #ifdef __cplusplus
  36. }
  37. #endif