Fix IRAM_ATTR not defined on LibreTiny (bk72xx)

IRAM_ATTR is defined by esp_attr.h on ESP32 but not on LibreTiny.
Add a no-op fallback in the C file since hal.h (which defines it
for C++) cannot be included from C.
This commit is contained in:
J. Nick Koston
2026-02-28 11:15:17 -10:00
parent 3c5d877d96
commit 59db01e8d7
+6
View File
@@ -126,6 +126,12 @@
#include <stddef.h>
// IRAM_ATTR is defined by esp_attr.h (included via FreeRTOS headers) on ESP32.
// On LibreTiny it's not defined — provide a no-op fallback.
#ifndef IRAM_ATTR
#define IRAM_ATTR
#endif
// Compile-time verification of thread safety assumptions.
// On ESP32 (Xtensa/RISC-V) and LibreTiny (ARM Cortex-M), naturally-aligned
// reads/writes up to 32 bits are atomic.