summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2023-11-07 14:46:32 +1100
committerjacqueline <me@jacqueline.id.au>2023-11-07 14:46:32 +1100
commit2b19e5703401f9af3dacda09bf4b8552e5f8832f (patch)
treecc7e5a23ec75904890ddb6e2e0393a56366de356 /src/drivers
parent19f0675b4410df4547db08b3f2899698092e7996 (diff)
downloadtangara-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.
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/gpios.cpp4
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);
}