esp_vfs_semihost.h 872 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * SPDX-FileCopyrightText: 2019-2022 Espressif Systems (Shanghai) CO LTD
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. #pragma once
  7. #include "esp_vfs.h"
  8. #ifdef __cplusplus
  9. extern "C" {
  10. #endif
  11. /**
  12. * @brief add virtual filesystem semihosting driver
  13. *
  14. * @param base_path VFS path to mount host directory
  15. * @return
  16. * - ESP_OK on success
  17. * - ESP_ERR_INVALID_ARG if esp_vfs_semihost_register was already called for specified VFS path
  18. * - ESP_ERR_NO_MEM if there are no slots to register new mount point
  19. */
  20. esp_err_t esp_vfs_semihost_register(const char* base_path);
  21. /**
  22. * @brief Un-register semihosting driver from VFS
  23. *
  24. * @return
  25. * - ESP_OK on success
  26. * - ESP_ERR_INVALID_ARG if semihosting driver is not registered in VFS at that path
  27. */
  28. esp_err_t esp_vfs_semihost_unregister(const char* base_path);
  29. #ifdef __cplusplus
  30. }
  31. #endif