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 #762 background imageLoading...
Page #762 background image
Chapter 2. API Reference
uint32_t size
Size of the region.
struct esp_flash_os_functions_t
OS-level integration hooks for accessing flash chips inside a running OS.
Its in the public header because some instances should be allocated statically in the startup code. May be
updated according to hardware version and new flash chip feature requirements, shouldnt be treated as public
API.
For advanced developers, you may replace some of them with your implementations at your own risk.
Public Members
esp_err_t (*start)(void *arg)
Called before commencing any flash operation. Does not need to be recursive (ie is called at most once
for each call to end).
esp_err_t (*end)(void *arg)
Called after completing any flash operation.
esp_err_t (*region_protected)(void *arg, size_t start_addr, size_t size)
Called before any erase/write operations to check whether the region is limited by the OS
esp_err_t (*delay_us)(void *arg, uint32_t us)
Delay for at least usmicroseconds. Called in between startand end.
void *(*get_temp_buffer)(void *arg, size_t reqest_size, size_t *out_size)
Called for get temp buffer when buffer from application cannot be directly read into/write from.
void (*release_temp_buffer)(void *arg, void *temp_buf)
Called for release temp buffer.
esp_err_t (*check_yield)(void *arg, uint32_t chip_status, uint32_t *out_request)
Yield to other tasks. Called during erase operations.
Return ESP_OK means yield needs to be called (got an event to handle), while ESP_ERR_TIMEOUT
means skip yield.
esp_err_t (*yield)(void *arg, uint32_t *out_status)
Yield to other tasks. Called during erase operations.
int64_t (*get_system_time)(void *arg)
Called for get system time.
struct esp_flash_t
Structure to describe a SPI flash chip connected to the system.
Structure must be initialized before use (passed to esp_flash_init()). Its in the public header because some
instances should be allocated statically in the startup code. May be updated according to hardware version and
new flash chip feature requirements, shouldnt be treated as public API.
For advanced developers, you may replace some of them with your implementations at your own risk.
Public Members
spi_flash_host_inst_t *host
Pointer to hardware-specific host_driverstructure. Must be initialized before used.
const spi_flash_chip_t *chip_drv
Pointer to chip-model-specific adapterstructure. If NULL, will be detected during initialisation.
const esp_flash_os_functions_t *os_func
Pointer to os-specific hook structure. Call esp_flash_init_os_functions() to setup this field,
after the host is properly initialized.
Espressif Systems 751
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