From d91d6945d728f066cabc31b97658333188dff6e4 Mon Sep 17 00:00:00 2001 From: "Michael (XIAO Xufeng)" Date: Wed, 4 Aug 2021 17:46:26 +0800 Subject: [PATCH] spi_master: fix the crash when using interrupt mode when cache is disabled Closes https://github.com/espressif/esp-idf/issues/6529 Closes https://github.com/espressif/esp-idf/issues/6781 Closes https://github.com/espressif/esp-idf/issues/7368 --- components/driver/spi_master.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/driver/spi_master.c b/components/driver/spi_master.c index 6973a49adb..e5438a12c5 100644 --- a/components/driver/spi_master.c +++ b/components/driver/spi_master.c @@ -487,13 +487,13 @@ static inline SPI_MASTER_ISR_ATTR bool spi_bus_device_is_polling(spi_device_t *d -----------------------------------------------------------------------------*/ // The interrupt may get invoked by the bus lock. -static void spi_bus_intr_enable(void *host) +static void SPI_MASTER_ISR_ATTR spi_bus_intr_enable(void *host) { esp_intr_enable(((spi_host_t*)host)->intr); } // The interrupt is always disabled by the ISR itself, not exposed -static void spi_bus_intr_disable(void *host) +static void SPI_MASTER_ISR_ATTR spi_bus_intr_disable(void *host) { esp_intr_disable(((spi_host_t*)host)->intr); }