From 20d884a2de8519f87f2d558d3bfc78d83edcbe39 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Tue, 10 Mar 2026 13:31:24 -1000 Subject: [PATCH] Replace #define with static constexpr for clang-tidy --- esphome/components/rp2040/crash_handler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/esphome/components/rp2040/crash_handler.cpp b/esphome/components/rp2040/crash_handler.cpp index 13e07a5de6..098a7fbfc0 100644 --- a/esphome/components/rp2040/crash_handler.cpp +++ b/esphome/components/rp2040/crash_handler.cpp @@ -8,8 +8,8 @@ // Cortex-M0+ exception frame offsets (words) // When a fault occurs, the CPU pushes: R0, R1, R2, R3, R12, LR, PC, xPSR -#define EF_LR 5 -#define EF_PC 6 +static constexpr uint32_t EF_LR = 5; +static constexpr uint32_t EF_PC = 6; static constexpr uint32_t CRASH_MAGIC = 0xDEADBEEF;