Symbols
loading...
Files
loading...

FatFS library

FatFS is a library defining the following symbols:

Most used functions

Name
Location
Summary
Convenience function to initialize FAT filesystem in SPI flash 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. - initializes flash wear levelling library on top of the given partition - mounts FAT partition using FATFS library on top of flash wear levelling library - registers FATFS library with VFS, with prefix given by base_prefix variable This function is intended to make example code more compact.
Prepend drive letters to path names This function returns new path path pointers, pointing to a temporary buffer inside ctx.
Register or unregister diskio driver for given drive number. When FATFS library calls one of disk_xxx functions for driver number pdrv, corresponding function in discio_impl for given pdrv will be called.
Unmount FAT filesystem and release resources acquired using esp_vfs_fat_spiflash_mount_rw_wl
Unmount an SD card from the FAT filesystem and release resources acquired using `esp_vfs_fat_sdmmc_mount()` or `esp_vfs_fat_sdspi_mount()`
Convenience function to get FAT filesystem on SD card registered in VFS This is an all-in-one function which does the following: - initializes SDMMC driver or SPI driver with configuration in host_config - initializes SD card with configuration in slot_config - mounts FAT partition on SD card using FATFS library, with configuration in mount_config - registers FATFS library with VFS, with prefix given by base_prefix variable This function is intended to make example code more compact. For real world applications, developers should implement the logic of probing SD card, locating and mounting partition, and registering FATFS in VFS, with proper error checking and handling of exceptional conditions.
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.
Get next available drive number
Convenience function to get FAT filesystem on SD card registered in VFS This is an all-in-one function which does the following: - initializes an SPI Master device based on the SPI Master driver with configuration in slot_config, and attach it to an initialized SPI bus. - initializes SD card with configuration in host_config_input - mounts FAT partition on SD card using FATFS library, with configuration in mount_config - registers FATFS library with VFS, with prefix given by base_prefix variable This function is intended to make example code more compact. For real world applications, developers should implement the logic of probing SD card, locating and mounting partition, and registering FATFS in VFS, with proper error checking and handling of exceptional conditions.
Get the driver number corresponding to a card
Enable/disable SD card status checking
Format FAT filesystem with given configuration
Format FAT filesystem with given configuration
Get information for FATFS partition
Unmount FAT filesystem and release resources acquired using esp_vfs_fat_sdmmc_mount @deprecated Use `esp_vfs_fat_sdcard_unmount()` instead.
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
Unmount FAT filesystem and release resources acquired using esp_vfs_fat_spiflash_mount_ro
ff_sdmmc_status() and ff_sdmmc_initialize() return STA_NOINIT when sdmmc_get_status() fails. This error value is checked throughout the FATFS code. Both functions return 0 on success.
Test if a file is contiguous in the FAT filesystem
@cond @deprecated Please use `esp_vfs_fat_register_cfg` instead
Create a file with contiguous space at given path
@deprecated Please use `esp_vfs_fat_spiflash_mount_rw_wl` instead
@deprecated Please use `esp_vfs_fat_spiflash_unmount_rw_wl` instead
@deprecated Please use `esp_vfs_fat_spiflash_mount_ro` instead
@deprecated Please use `esp_vfs_fat_spiflash_unmount_ro` instead

Other commonly used symbols

Name
Location
Summary
Configuration arguments for esp_vfs_fat_sdmmc_mount and esp_vfs_fat_spiflash_mount_rw_wl functions
Structure of pointers to disk IO driver functions. See FatFs documentation for details about these functions
If FAT partition can not be mounted, and this parameter is true, create partition table and format the filesystem.
If format_if_mount_failed is set, and mount fails, format the card with given allocation unit size. Must be a power of 2, between sector size and 128 * sector size. For SD cards, sector size is always 512 bytes. For wear_levelling, sector size is determined by CONFIG_WL_SECTOR_SIZE option. Using larger allocation unit size will result in higher read/write performance and higher overhead when storing small files. Setting this field to 0 will result in allocation unit set to the sector size.
Configuration structure for esp_vfs_fat_register
This `s_saved_ctx_id` is only used by `esp_vfs_fat_sdmmc_unmount`, which is deprecated. This variable together with `esp_vfs_fat_sdmmc_unmount` should be removed in next major version
Use 1 FAT (File Allocation Tables) instead of 2. This decreases reliability, but makes more space available (usually only one sector). Note that this option has effect only when the filesystem is formatted. When mounting an already-formatted partition, the actual number of FATs may be different.
disk initialization function
disk status check function
sector read function
sector write function
function to get info about disk and do some misc operations
Path prefix where FATFS should be registered,
FATFS drive specification; if only one drive is used, can be an empty string.
Maximum number of files which can be open at the same time.
Enables real ff_disk_status function implementation for SD cards (ff_sdmmc_status). Possibly slows down IO performance. Try to enable if you need to handle situations when SD cards are not unmounted properly before physical removal or you are experiencing issues with SD cards. Doesn't do anything for other memory storage media.