Skip to content

Commit

Permalink
Rp2040 fix IRAM_ATTR usage (#2644)
Browse files Browse the repository at this point in the history
Should only be in implementation (rather than declaration) but cannot be in both.
  • Loading branch information
mikee47 authored May 26, 2023
1 parent 862bb32 commit c01e326
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Sming/Arch/Rp2040/Components/driver/hw_timer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions Sming/Arch/Rp2040/Components/driver/include/driver/hw_timer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit c01e326

Please sign in to comment.