pub unsafe extern "C" fn esp_vfs_fat_spiflash_mount_ro(
    base_path: *const c_char,
    partition_label: *const c_char,
    mount_config: *const esp_vfs_fat_mount_config_t
) -> esp_err_t
Expand description

@brief Convenience function to initialize read-only FAT filesystem and register it in VFS

This is an all-in-one function which does the following:

  • finds the partition with defined partition_label. Partition label should be configured in the partition table.
  • mounts FAT partition using FATFS library
  • registers FATFS library with VFS, with prefix given by base_prefix variable

@note Wear levelling is not used when FAT is mounted in read-only mode using this function.

@param base_path path where FATFS partition should be mounted (e.g. “/spiflash”) @param partition_label label of the partition which should be used @param mount_config pointer to structure with extra parameters for mounting FATFS @return - ESP_OK on success - ESP_ERR_NOT_FOUND if the partition table does not contain FATFS partition with given label - ESP_ERR_INVALID_STATE if esp_vfs_fat_spiflash_mount_ro was already called for the same partition - ESP_ERR_NO_MEM if memory can not be allocated - ESP_FAIL if partition can not be mounted - other error codes from SPI flash driver, or FATFS drivers