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
pointer to structure with extra parameters for mounting FATFS
Return value
- 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
Notes
Wear levelling is not used when FAT is mounted in read-only mode using this function.
Examples
esp_vfs_fat_spiflash_mount_ro() is referenced by 1 libraries and example projects: