mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
fatfs: Remove esp_vfs_fat_unregister()
Deprecated in ESP-IDF V2.0
This commit is contained in:
parent
ba54a552c1
commit
fb748bae7f
@ -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
|
||||
*
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user