Function esp_idf_hal::sys::esp_vfs_fat_sdcard_format
source · pub unsafe extern "C" fn esp_vfs_fat_sdcard_format(
base_path: *const i8,
card: *mut sdmmc_card_t,
) -> i32
Expand description
@brief Format FAT filesystem
@note This API should be only called when the FAT is already mounted.
@param base_path Path where partition should be registered (e.g. “/sdcard”)
@param card Pointer to the card handle, which should be initialised by calling esp_vfs_fat_sdspi_mount
first
@return - 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