esp_vfs_fat_spiflash_format_cfg_rw_wl() function
Format FAT filesystem with given configuration
Arguments
base_path
Path where partition should be registered (e.g. "/spiflash")
partition_label
Label of the partition which should be used
cfg
Pointer to structure with extra parameters for formatting FATFS (only relevant fields are used). If NULL and mounted the previous configuration will be used. If NULL and unmounted the default configuration will be used.
Return value
- ESP_OK - ESP_ERR_NO_MEM: if memory can not be allocated - Other errors from esp_vfs_fat_spiflash_mount_rw_wl
Notes
This API can be called when the FAT is mounted / not mounted. If this API is called when the FAT isn't mounted (by calling esp_vfs_fat_spiflash_mount_rw_wl), this API will first mount the FAT then format it, then restore back to the original state.