From 9f7508e50be4efb6125550d32ac181ad95f8b889 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sat, 28 Feb 2026 15:01:52 -1000 Subject: [PATCH] Add IRAM_ATTR to esphome_get_ipsr for future-proofing Currently a no-op on LibreTiny but ensures the function stays in IRAM if the platform later defines IRAM_ATTR. --- esphome/core/lwip_fast_select.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphome/core/lwip_fast_select.c b/esphome/core/lwip_fast_select.c index 63a58b71e6b..a3cc6ab8fe1 100644 --- a/esphome/core/lwip_fast_select.c +++ b/esphome/core/lwip_fast_select.c @@ -246,7 +246,7 @@ void IRAM_ATTR esphome_lwip_wake_main_loop_from_isr(int *px_higher_priority_task // Read the ARM Cortex-M IPSR register directly via inline asm. // Avoids depending on CMSIS __get_IPSR() which may not be declared/available // in all LibreTiny chip family toolchains (e.g. beken-72xx). -static inline uint32_t esphome_get_ipsr(void) { +static inline IRAM_ATTR uint32_t esphome_get_ipsr(void) { uint32_t ipsr = 0; __asm volatile("mrs %0, ipsr" : "=r"(ipsr)); return ipsr;