diff options
| author | jacqueline <me@jacqueline.id.au> | 2023-11-07 14:46:32 +1100 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2023-11-07 14:46:32 +1100 |
| commit | 2b19e5703401f9af3dacda09bf4b8552e5f8832f (patch) | |
| tree | cc7e5a23ec75904890ddb6e2e0393a56366de356 | |
| parent | 19f0675b4410df4547db08b3f2899698092e7996 (diff) | |
| download | tangara-fw-2b19e5703401f9af3dacda09bf4b8552e5f8832f.tar.gz | |
Ensure the GPIO ISR is in IRAM
The shared interrupt is flagged as IRAM-capable, so this handler should
be too.
| -rw-r--r-- | src/drivers/gpios.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/drivers/gpios.cpp b/src/drivers/gpios.cpp index 412c091f..23a98c6f 100644 --- a/src/drivers/gpios.cpp +++ b/src/drivers/gpios.cpp @@ -11,7 +11,9 @@ #include <cstdint> #include "driver/gpio.h" +#include "esp_attr.h" #include "hal/gpio_types.h" + #include "i2c.hpp" namespace drivers { @@ -60,7 +62,7 @@ constexpr std::pair<uint8_t, uint8_t> unpack(uint16_t ba) { SemaphoreHandle_t Gpios::sReadPending; -static void interrupt_isr(void* arg) { +IRAM_ATTR static void interrupt_isr(void* arg) { SemaphoreHandle_t sem = reinterpret_cast<SemaphoreHandle_t>(arg); xSemaphoreGive(sem); } |
