ESP32 HAL: Fix random pauses during prints (#16548)
This commit is contained in:
committed by
Scott Lahteine
parent
5bd66241df
commit
2b9eb4437b
@@ -145,21 +145,7 @@
|
||||
}
|
||||
#undef nop
|
||||
|
||||
#elif defined(ESP32)
|
||||
|
||||
FORCE_INLINE static void DELAY_CYCLES(uint32_t x) {
|
||||
unsigned long ccount, stop;
|
||||
|
||||
__asm__ __volatile__ ( "rsr %0, ccount" : "=a" (ccount) );
|
||||
|
||||
stop = ccount + x; // This can overflow
|
||||
|
||||
while (ccount < stop) { // This doesn't deal with overflows
|
||||
__asm__ __volatile__ ( "rsr %0, ccount" : "=a" (ccount) );
|
||||
}
|
||||
}
|
||||
|
||||
#elif defined(__PLAT_LINUX__)
|
||||
#elif defined(__PLAT_LINUX__) || defined(ESP32)
|
||||
|
||||
// specified inside platform
|
||||
|
||||
|
Reference in New Issue
Block a user