mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-10 04:43:33 +00:00
spi_flash: don't call vTaskDelay in non-os context
Fixes regression in core dump, when a crash happens in interrupt context.
This commit is contained in:
@@ -341,6 +341,10 @@ typedef void (*spi_flash_op_unlock_func_t)(void);
|
||||
* @brief Function to protect SPI flash critical regions corruption.
|
||||
*/
|
||||
typedef bool (*spi_flash_is_safe_write_address_t)(size_t addr, size_t size);
|
||||
/**
|
||||
* @brief Function to yield to the OS during erase operation.
|
||||
*/
|
||||
typedef void (*spi_flash_os_yield_t)(void);
|
||||
|
||||
/**
|
||||
* Structure holding SPI flash access critical sections management functions.
|
||||
@@ -381,6 +385,7 @@ typedef struct {
|
||||
#if !CONFIG_SPI_FLASH_DANGEROUS_WRITE_ALLOWED
|
||||
spi_flash_is_safe_write_address_t is_safe_write_address; /**< checks flash write addresses.*/
|
||||
#endif
|
||||
spi_flash_os_yield_t yield; /**< yield to the OS during flash erase */
|
||||
} spi_flash_guard_funcs_t;
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user