EasyManuals Logo

Espressif ESP32-S2 User Manual

Espressif ESP32-S2
1695 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #710 background imageLoading...
Page #710 background image
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 char *base_path, const char
*partition_label)
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 hasnt 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 ff_diskio_impl_t *discio_impl)
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 ff_diskio_impl_t structure with diskio functions or NULL to unregister
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
count)
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 699
Submit Document Feedback
Release v4.4

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

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

Espressif ESP32-S2 Specifications

General IconGeneral
BrandEspressif
ModelESP32-S2
CategorySingle board computers
LanguageEnglish