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 55b8f67 commit 82161beCopy full SHA for 82161be
cores/esp32/Esp.h
@@ -22,9 +22,7 @@
22
23
#include <Arduino.h>
24
#include <esp_partition.h>
25
-#ifndef CONFIG_IDF_TARGET_ESP32 // Broken in IDF 20210417
26
-#include <hal/systimer_hal.h>
27
-#endif
+#include <hal/cpu_hal.h>
28
29
/**
30
* AVR macros for WDT managment
@@ -113,13 +111,7 @@ class EspClass
113
111
114
112
uint32_t ARDUINO_ISR_ATTR EspClass::getCycleCount()
115
{
116
- uint32_t ccount;
117
-#ifdef CONFIG_IDF_TARGET_ESP32
118
- __asm__ __volatile__("esync; rsr %0,ccount":"=a" (ccount));
119
-#else // This should work on ESP32 once the hal is complete
120
- ccount = systimer_hal_get_counter_value(SYSTIMER_COUNTER_0);
121
122
- return ccount;
+ return cpu_hal_get_cycle_count();
123
}
124
125
extern EspClass ESP;
0 commit comments