Skip to content

Commit

Permalink
Fix hw_timer1_read() (#2701)
Browse files Browse the repository at this point in the history
SDK >= 5 requies additional call
  • Loading branch information
mikee47 authored Jan 9, 2024
1 parent d87ee6c commit 5b9c2a7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Sming/Arch/Esp32/Components/driver/hw_timer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ class TimerConfig
timer_ll_get_counter_value(dev, index, &val);
return val;
#else
timer_ll_trigger_soft_capture(dev, index);
return timer_ll_get_counter_value(dev, index);
#endif
}
Expand Down Expand Up @@ -214,7 +215,7 @@ void IRAM_ATTR hw_timer1_disable(void)
timer.enable_counter(false);
}

uint32_t hw_timer1_read(void)
uint32_t IRAM_ATTR hw_timer1_read(void)
{
return timer.get_counter_value();
}
Expand Down

0 comments on commit 5b9c2a7

Please sign in to comment.