tusb_console.h 622 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * SPDX-FileCopyrightText: 2020-2022 Espressif Systems (Shanghai) CO LTD
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. #pragma once
  7. #ifdef __cplusplus
  8. extern "C" {
  9. #endif
  10. #include "esp_err.h"
  11. /**
  12. * @brief Redirect output to the USB serial
  13. * @param cdc_intf - interface number of TinyUSB's CDC
  14. *
  15. * @return esp_err_t - ESP_OK, ESP_FAIL or an error code
  16. */
  17. esp_err_t esp_tusb_init_console(int cdc_intf);
  18. /**
  19. * @brief Switch log to the default output
  20. * @param cdc_intf - interface number of TinyUSB's CDC
  21. *
  22. * @return esp_err_t
  23. */
  24. esp_err_t esp_tusb_deinit_console(int cdc_intf);
  25. #ifdef __cplusplus
  26. }
  27. #endif