Ensure the GPIO ISR is in IRAM

The shared interrupt is flagged as IRAM-capable, so this handler should
be too.
custom
jacqueline 1 year ago
parent 19f0675b44
commit 2b19e57034
  1. 4
      src/drivers/gpios.cpp

@ -11,7 +11,9 @@
#include <cstdint> #include <cstdint>
#include "driver/gpio.h" #include "driver/gpio.h"
#include "esp_attr.h"
#include "hal/gpio_types.h" #include "hal/gpio_types.h"
#include "i2c.hpp" #include "i2c.hpp"
namespace drivers { namespace drivers {
@ -60,7 +62,7 @@ constexpr std::pair<uint8_t, uint8_t> unpack(uint16_t ba) {
SemaphoreHandle_t Gpios::sReadPending; 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); SemaphoreHandle_t sem = reinterpret_cast<SemaphoreHandle_t>(arg);
xSemaphoreGive(sem); xSemaphoreGive(sem);
} }

Loading…
Cancel
Save