From c01e3262c94e2060f7883150a75026f4186ecbcf Mon Sep 17 00:00:00 2001 From: Mike Date: Fri, 26 May 2023 15:00:36 +0100 Subject: [PATCH] Rp2040 fix IRAM_ATTR usage (#2644) Should only be in implementation (rather than declaration) but cannot be in both. --- Sming/Arch/Rp2040/Components/driver/hw_timer.cpp | 2 +- Sming/Arch/Rp2040/Components/driver/include/driver/hw_timer.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Sming/Arch/Rp2040/Components/driver/hw_timer.cpp b/Sming/Arch/Rp2040/Components/driver/hw_timer.cpp index aa1dad346f..0c8f44c741 100644 --- a/Sming/Arch/Rp2040/Components/driver/hw_timer.cpp +++ b/Sming/Arch/Rp2040/Components/driver/hw_timer.cpp @@ -30,7 +30,7 @@ void IRAM_ATTR timer1_isr() } // namespace -void hw_timer1_attach_interrupt(hw_timer_source_type_t source_type, hw_timer_callback_t callback, void* arg) +void IRAM_ATTR hw_timer1_attach_interrupt(hw_timer_source_type_t source_type, hw_timer_callback_t callback, void* arg) { (void)source_type; auto& p = hw_timer_private; diff --git a/Sming/Arch/Rp2040/Components/driver/include/driver/hw_timer.h b/Sming/Arch/Rp2040/Components/driver/include/driver/hw_timer.h index f8cc61272b..b94d5b4e34 100644 --- a/Sming/Arch/Rp2040/Components/driver/include/driver/hw_timer.h +++ b/Sming/Arch/Rp2040/Components/driver/include/driver/hw_timer.h @@ -93,7 +93,7 @@ extern struct hw_timer_private_t hw_timer_private; * @param callback Callback function invoked via timer interrupt * @param arg Passed to callback function */ -void IRAM_ATTR hw_timer1_attach_interrupt(hw_timer_source_type_t source_type, hw_timer_callback_t callback, void* arg); +void hw_timer1_attach_interrupt(hw_timer_source_type_t source_type, hw_timer_callback_t callback, void* arg); /** * @brief Detach interrupt from the timer @@ -106,7 +106,7 @@ void hw_timer1_detach_interrupt(); * @param intr_type * @param auto_load */ -void IRAM_ATTR hw_timer1_enable(hw_timer_clkdiv_t div, hw_timer_intr_type_t intr_type, bool auto_load); +void hw_timer1_enable(hw_timer_clkdiv_t div, hw_timer_intr_type_t intr_type, bool auto_load); /** * @brief Set the timer interval and arm