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 #778 background imageLoading...
Page #778 background image
Chapter 2. API Reference
2. If you have an environment where a Python interpreter is not available, but a host compiler is available. Oth-
erwise, a pre-compiled mkspiffs binary can do the job. However, there is no build system integration for
mkspiffs and the user has to do the corresponding work: compiling mkspiffs during build (if a pre-
compiled binary is not used), creating build rules/targets for the output files, passing proper parameters to the
tool, etc.
See also
Partition Table documentation
Application Example
An example of using SPIFFS is provided in the storage/spiffs directory. This example initializes and mounts a
SPIFFS partition, then writes and reads data from it using POSIX and C library APIs. See the README.md file in
the example directory for more information.
High-level API Reference
Header File
components/spis/include/esp_spiffs.h
Functions
esp_err_t esp_vfs_spiffs_register(const esp_vfs_spis_conf_t *conf)
Register and mount SPIFFS to VFS with given path prefix.
Return
ESP_OK if success
ESP_ERR_NO_MEM if objects could not be allocated
ESP_ERR_INVALID_STATE if already mounted or partition is encrypted
ESP_ERR_NOT_FOUND if partition for SPIFFS was not found
ESP_FAIL if mount or format fails
Parameters
conf: Pointer to esp_vfs_spis_conf_t configuration structure
esp_err_t esp_vfs_spiffs_unregister(const char *partition_label)
Unregister and unmount SPIFFS from VFS
Return
ESP_OK if successful
ESP_ERR_INVALID_STATE already unregistered
Parameters
partition_label: Same label as passed to esp_vfs_spis_register.
bool esp_spiffs_mounted(const char *partition_label)
Check if SPIFFS is mounted
Return
true if mounted
false if not mounted
Parameters
partition_label: Optional, label of the partition to check. If not specified, first partition with
subtype=spiffs is used.
esp_err_t esp_spiffs_format(const char *partition_label)
Format the SPIFFS partition
Return
ESP_OK if successful
ESP_FAIL on error
Espressif Systems 767
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