mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-19 23:22:16 +03:00
A port of ESP32 Arduino PR https://github.com/espressif/arduino-esp32/pull/3165 (#6477)
This commit is contained in:
parent
b6e58301af
commit
0399bb1fee
@ -201,9 +201,10 @@ class EspClass {
|
|||||||
bool eraseConfig();
|
bool eraseConfig();
|
||||||
|
|
||||||
#ifndef CORE_MOCK
|
#ifndef CORE_MOCK
|
||||||
inline
|
inline uint32_t getCycleCount() __attribute__((always_inline));
|
||||||
#endif
|
#else
|
||||||
uint32_t getCycleCount();
|
uint32_t getCycleCount();
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef CORE_MOCK
|
#ifndef CORE_MOCK
|
||||||
|
@ -85,7 +85,8 @@ namespace arduino
|
|||||||
#define xt_rsil(level) (__extension__({uint32_t state; __asm__ __volatile__("rsil %0," __STRINGIFY(level) : "=a" (state) :: "memory"); state;}))
|
#define xt_rsil(level) (__extension__({uint32_t state; __asm__ __volatile__("rsil %0," __STRINGIFY(level) : "=a" (state) :: "memory"); state;}))
|
||||||
#define xt_wsr_ps(state) __asm__ __volatile__("wsr %0,ps; isync" :: "a" (state) : "memory")
|
#define xt_wsr_ps(state) __asm__ __volatile__("wsr %0,ps; isync" :: "a" (state) : "memory")
|
||||||
|
|
||||||
inline uint32_t esp_get_cycle_count() {
|
inline uint32_t esp_get_cycle_count() __attribute__((always_inline));
|
||||||
|
inline uint32_t esp_get_cycle_count() {
|
||||||
uint32_t ccount;
|
uint32_t ccount;
|
||||||
__asm__ __volatile__("rsr %0,ccount":"=a"(ccount));
|
__asm__ __volatile__("rsr %0,ccount":"=a"(ccount));
|
||||||
return ccount;
|
return ccount;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user