mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04: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:
parent
48ae7ab500
commit
075446318d
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user