Function esp_idf_sys::esp_vfs_fat_sdcard_format_cfg

source ·
pub unsafe extern "C" fn esp_vfs_fat_sdcard_format_cfg(
    base_path: *const c_char,
    card: *mut sdmmc_card_t,
    cfg: *mut esp_vfs_fat_mount_config_t,
) -> esp_err_t
Expand description

@brief Format FAT filesystem with given configuration

@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 @param cfg Pointer to structure with extra parameters for formatting FATFS (only relevant fields are used). If NULL, the previous configuration will be used.

@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