esp_idf_sys

Function esp_vfs_fat_register_cfg

Source
pub unsafe extern "C" fn esp_vfs_fat_register_cfg(
    conf: *const esp_vfs_fat_conf_t,
    out_fs: *mut *mut FATFS,
) -> esp_err_t
Expand description

@brief Register FATFS with VFS component

This function registers given FAT drive in VFS, at the specified base path. Input arguments are held in esp_vfs_fat_conf_t structure. If only one drive is used, fat_drive argument can be an empty string. Refer to FATFS library documentation on how to specify FAT drive. This function also allocates FATFS structure which should be used for f_mount call.

@note This function doesn’t mount the drive into FATFS, it just connects POSIX and C standard library IO function with FATFS. You need to mount desired drive into FATFS separately.

@param conf pointer to esp_vfs_fat_conf_t configuration structure @param[out] out_fs pointer to FATFS structure which can be used for FATFS f_mount call is returned via this argument. @return - ESP_OK on success - ESP_ERR_INVALID_STATE if esp_vfs_fat_register was already called - ESP_ERR_NO_MEM if not enough memory or too many VFSes already registered