Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
arduino-esp32
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
arduino-esp32
Commits
82161beb
Commit
82161beb
authored
Apr 19, 2021
by
me-no-dev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use cpu_hal_get_cycle_count for all chips
parent
55b8f67d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
10 deletions
+2
-10
cores/esp32/Esp.h
cores/esp32/Esp.h
+2
-10
No files found.
cores/esp32/Esp.h
View file @
82161beb
...
...
@@ -22,9 +22,7 @@
#include <Arduino.h>
#include <esp_partition.h>
#ifndef CONFIG_IDF_TARGET_ESP32 // Broken in IDF 20210417
#include <hal/systimer_hal.h>
#endif
#include <hal/cpu_hal.h>
/**
* AVR macros for WDT managment
...
...
@@ -113,13 +111,7 @@ public:
uint32_t
ARDUINO_ISR_ATTR
EspClass
::
getCycleCount
()
{
uint32_t
ccount
;
#ifdef CONFIG_IDF_TARGET_ESP32
__asm__
__volatile__
(
"esync; rsr %0,ccount"
:
"=a"
(
ccount
));
#else // This should work on ESP32 once the hal is complete
ccount
=
systimer_hal_get_counter_value
(
SYSTIMER_COUNTER_0
);
#endif
return
ccount
;
return
cpu_hal_get_cycle_count
();
}
extern
EspClass
ESP
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment