From efc00f11834f5aeedf612f53c803e5085b949aa8 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Mon, 14 Mar 2022 23:29:41 +0100 Subject: [PATCH] driver: spi_slave: make sure CS helpers are in IRAM if the ISR is Closes https://github.com/espressif/esp-idf/issues/3870 --- components/driver/spi_slave.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/driver/spi_slave.c b/components/driver/spi_slave.c index e8794149f6..8dc7da5ebc 100644 --- a/components/driver/spi_slave.c +++ b/components/driver/spi_slave.c @@ -73,21 +73,21 @@ typedef struct { static spi_slave_t *spihost[SOC_SPI_PERIPH_NUM]; -static void IRAM_ATTR spi_intr(void *arg); +static void SPI_SLAVE_ISR_ATTR spi_intr(void *arg); -static inline bool bus_is_iomux(spi_slave_t *host) +static inline bool SPI_SLAVE_ISR_ATTR bus_is_iomux(spi_slave_t *host) { return host->flags&SPICOMMON_BUSFLAG_IOMUX_PINS; } -static void freeze_cs(spi_slave_t *host) +static void SPI_SLAVE_ISR_ATTR freeze_cs(spi_slave_t *host) { gpio_matrix_in(GPIO_FUNC_IN_HIGH, spi_periph_signal[host->id].spics_in, false); } // Use this function instead of cs_initial to avoid overwrite the output config // This is used in test by internal gpio matrix connections -static inline void restore_cs(spi_slave_t *host) +static inline void SPI_SLAVE_ISR_ATTR restore_cs(spi_slave_t *host) { if (bus_is_iomux(host)) { gpio_iomux_in(host->cfg.spics_io_num, spi_periph_signal[host->id].spics_in);