mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-19 07:55:54 +00:00
Merge branch 'fix/esp_flash_coredump_4.0' into 'release/v4.0'
esp_flash: fix coredump issues (backport v4.0) See merge request espressif/esp-idf!6136
This commit is contained in:
@@ -45,6 +45,9 @@ typedef struct {
|
||||
/** Called after completing any flash operation. */
|
||||
esp_err_t (*end)(void *arg);
|
||||
|
||||
/** Called before any erase/write operations to check whether the region is limited by the OS */
|
||||
esp_err_t (*region_protected)(void* arg, size_t start_addr, size_t size);
|
||||
|
||||
/** Delay for at least 'ms' milliseconds. Called in between 'start' and 'end'. */
|
||||
esp_err_t (*delay_ms)(void *arg, unsigned ms);
|
||||
} esp_flash_os_functions_t;
|
||||
@@ -282,33 +285,6 @@ esp_err_t esp_flash_read_encrypted(esp_flash_t *chip, uint32_t address, void *ou
|
||||
*/
|
||||
extern esp_flash_t *esp_flash_default_chip;
|
||||
|
||||
/** @brief Initialise the default SPI flash chip
|
||||
*
|
||||
* Called by OS startup code. You do not need to call this in your own applications.
|
||||
*/
|
||||
esp_err_t esp_flash_init_default_chip();
|
||||
|
||||
/**
|
||||
* Enable OS-level SPI flash protections in IDF
|
||||
*
|
||||
* Called by OS startup code. You do not need to call this in your own applications.
|
||||
*
|
||||
* @return ESP_OK if success, otherwise failed. See return value of ``esp_flash_init_os_functions``.
|
||||
*/
|
||||
esp_err_t esp_flash_app_init();
|
||||
|
||||
/**
|
||||
* Enable OS-level SPI flash for a specific chip.
|
||||
*
|
||||
* @param chip The chip to init os functions.
|
||||
* @param host_id Which SPI host to use, 1 for SPI1, 2 for SPI2 (HSPI), 3 for SPI3 (VSPI)
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK if success
|
||||
* - ESP_ERR_INVALID_ARG if host_id is invalid
|
||||
*/
|
||||
esp_err_t esp_flash_init_os_functions(esp_flash_t *chip, int host_id);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
Reference in New Issue
Block a user