8000
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 5502879 commit 8645971Copy full SHA for 8645971
cores/esp32/esp32-hal-misc.c
@@ -160,15 +160,15 @@ void delay(uint32_t ms)
160
161
void ARDUINO_ISR_ATTR delayMicroseconds(uint32_t us)
162
{
163
- uint32_t m = micros();
+ uint64_t m = (uint64_t)esp_timer_get_time();
164
if(us){
165
- uint32_t e = (m + us);
+ uint64_t e = (m + us);
166
if(m > e){ //overflow
167
- while(micros() > e){
+ while((uint64_t)esp_timer_get_time() > e){
168
NOP();
169
}
170
171
- while(micros() < e){
+ while((uint64_t)esp_timer_get_time() < e){
172
173
174
0 commit comments