mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-09 15:44:34 +02:00
spi_flash: define spi_flash_guard_{start,stop} with IRAM_ATTR
These functions are marked as inline and are called from functions which are in IRAM. In release (-Os) builds, the compiler may decide not to inline these functions. Placing these functions into IRAM explicitly works around this.
This commit is contained in:
@@ -103,16 +103,18 @@ SpiFlashOpResult IRAM_ATTR spi_flash_unlock()
|
||||
return SPI_FLASH_RESULT_OK;
|
||||
}
|
||||
|
||||
static inline void spi_flash_guard_start()
|
||||
static inline void IRAM_ATTR spi_flash_guard_start()
|
||||
{
|
||||
if (s_flash_guard_ops)
|
||||
if (s_flash_guard_ops) {
|
||||
s_flash_guard_ops->start();
|
||||
}
|
||||
}
|
||||
|
||||
static inline void spi_flash_guard_end()
|
||||
static inline void IRAM_ATTR spi_flash_guard_end()
|
||||
{
|
||||
if (s_flash_guard_ops)
|
||||
if (s_flash_guard_ops) {
|
||||
s_flash_guard_ops->end();
|
||||
}
|
||||
}
|
||||
|
||||
esp_err_t IRAM_ATTR spi_flash_erase_sector(size_t sec)
|
||||
|
Reference in New Issue
Block a user