vfs_tinyusb.h 795 B

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * SPDX-FileCopyrightText: 2020-2022 Espressif Systems (Shanghai) CO LTD
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. #pragma once
  7. #include "esp_err.h"
  8. #ifdef __cplusplus
  9. extern "C" {
  10. #endif
  11. /**
  12. * @brief Register TinyUSB CDC at VFS with path
  13. * @param cdc_intf - interface number of TinyUSB's CDC
  14. * @param path - path where the CDC will be registered, `/dev/tusb_cdc` will be used if left NULL.
  15. *
  16. * @return esp_err_t ESP_OK or ESP_FAIL
  17. */
  18. esp_err_t esp_vfs_tusb_cdc_register(int cdc_intf, char const *path);
  19. /**
  20. * @brief Unregister TinyUSB CDC from VFS
  21. * @param path - path where the CDC will be unregistered if NULL will be used `/dev/tusb_cdc`
  22. *
  23. * @return esp_err_t ESP_OK or ESP_FAIL
  24. */
  25. esp_err_t esp_vfs_tusb_cdc_unregister(char const *path);
  26. #ifdef __cplusplus
  27. }
  28. #endif