mirror of
https://github.com/esphome/esphome.git
synced 2026-07-10 17:05:36 +00:00
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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user