fatfs: Remove esp_vfs_fat_unregister()

Deprecated in ESP-IDF V2.0
This commit is contained in:
Angus Gratton 2019-08-21 12:52:55 +10:00 committed by Angus Gratton
parent ba54a552c1
commit fb748bae7f
2 changed files with 0 additions and 27 deletions

View File

@ -51,20 +51,6 @@ extern "C" {
esp_err_t esp_vfs_fat_register(const char* base_path, const char* fat_drive,
size_t max_files, FATFS** out_fs);
/**
* @brief Un-register FATFS from VFS
*
* @note FATFS structure returned by esp_vfs_fat_register is destroyed after
* this call. Make sure to call f_mount function to unmount it before
* calling esp_vfs_fat_unregister.
* This function is left for compatibility and will be changed in
* future versions to accept base_path and replace the method below
* @return
* - ESP_OK on success
* - ESP_ERR_INVALID_STATE if FATFS is not registered in VFS
*/
esp_err_t esp_vfs_fat_unregister(void) __attribute__((deprecated));
/**
* @brief Un-register FATFS from VFS
*

View File

@ -205,19 +205,6 @@ esp_err_t esp_vfs_fat_unregister_path(const char* base_path)
return ESP_OK;
}
esp_err_t esp_vfs_fat_unregister(void)
{
if (s_fat_ctx == NULL) {
return ESP_ERR_INVALID_STATE;
}
esp_err_t err = esp_vfs_fat_unregister_path(s_fat_ctx->base_path);
if (err != ESP_OK) {
return err;
}
s_fat_ctx = NULL;
return ESP_OK;
}
static int get_next_fd(vfs_fat_ctx_t* fat_ctx)
{
for (size_t i = 0; i < fat_ctx->max_files; ++i) {