We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 29455a0 commit 94809ceCopy full SHA for 94809ce
cores/esp32/esp32-hal-timer.c
@@ -119,8 +119,9 @@ void ARDUINO_ISR_ATTR __timerISR(void * arg){
119
}
120
121
122
-uint64_t timerRead(hw_timer_t *timer){
+uint64_t inline timerRead(hw_timer_t *timer){
123
timer->dev->update = 1;
124
+ while (timer->dev->update) {};
125
uint64_t h = timer->dev->cnt_high;
126
uint64_t l = timer->dev->cnt_low;
127
return (h << 32) | l;
0 commit comments