Espressif ESP32-S2 Programming Manual page 710

Table of Contents

Advertisement

Chapter 2. API Reference
• ESP_ERR_INVALID_STATE if esp_vfs_fat_rawflash_mount was already called for the same par-
tition
• 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
Parameters
• base_path: path where FATFS partition should be mounted (e.g. "/spiflash")
• partition_label: label of the partition which should be used
• mount_config: pointer to structure with extra parameters for mounting FATFS
esp_err_t
esp_vfs_fat_rawflash_unmount(const
Unmount FAT filesystem and release resources acquired using esp_vfs_fat_rawflash_mount.
Return
• ESP_OK on success
• ESP_ERR_INVALID_STATE if esp_vfs_fat_spiflash_mount hasn't been called
Parameters
• base_path: path where partition should be registered (e.g. "/spiflash")
• partition_label: label of partition to be unmounted
FatFS disk IO layer
FatFs has been extended with API functions that register the disk I/O driver at runtime.
They provide implementation of disk I/O functions for SD/MMC cards and can be registered for the given FatFs
drive number using the function ff_diskio_register_sdmmc().
void ff_diskio_register(BYTE pdrv, const
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 dis-
cio_impl for given pdrv will be called.
Parameters
• pdrv: drive number
• discio_impl: pointer to
and free previously registered drive
struct ff_diskio_impl_t
Structure of pointers to disk IO driver functions.
See FatFs documentation for details about these functions
Public Members
DSTATUS (*init)(unsigned char pdrv)
disk initialization function
DSTATUS (*status)(unsigned char pdrv)
disk status check function
DRESULT (*read)(unsigned char pdrv, unsigned char *buff, uint32_t sector, unsigned count)
sector read function
DRESULT (*write)(unsigned char pdrv, const unsigned char *buff, uint32_t sector, unsigned
sector write function
DRESULT (*ioctl)(unsigned char pdrv, unsigned char cmd, void *buff)
function to get info about disk and do some misc operations
Espressif Systems
*partition_label)
ff_diskio_impl_t
ff_diskio_impl_t
count)
699
Submit Document Feedback
char
*base_path,
*discio_impl)
structure with diskio functions or NULL to unregister
const
char
Release v4.4

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ESP32-S2 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Table of Contents

Save PDF