未验证 提交 94809ce3 编写于 作者: L Lori 提交者: GitHub

fix: timerRead() is returning the last read value, not the actual #3434 (#5498)

上级 29455a04
......@@ -119,8 +119,9 @@ void ARDUINO_ISR_ATTR __timerISR(void * arg){
}
}
uint64_t timerRead(hw_timer_t *timer){
uint64_t inline timerRead(hw_timer_t *timer){
timer->dev->update = 1;
while (timer->dev->update) {};
uint64_t h = timer->dev->cnt_high;
uint64_t l = timer->dev->cnt_low;
return (h << 32) | l;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册