esp_vfs_fat_sdcard_format_cfg() function
Format FAT filesystem with given configuration
Arguments
base_path
Path where partition should be registered (e.g. "/sdcard")
card
Pointer to the card handle, which should be initialised by calling `esp_vfs_fat_sdspi_mount` first
cfg
Pointer to structure with extra parameters for formatting FATFS (only relevant fields are used). If NULL, the previous configuration will be used.
Return value
- ESP_OK - ESP_ERR_INVALID_STATE: FAT partition isn't mounted, call esp_vfs_fat_sdmmc_mount or esp_vfs_fat_sdspi_mount first - ESP_ERR_NO_MEM: if memory can not be allocated - ESP_FAIL: fail to format it, or fail to mount back
Notes
This API should be only called when the FAT is already mounted.