1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-19 23:22:16 +03:00
This commit is contained in:
Dirk O. Kaar 2019-09-02 14:11:41 +02:00 committed by Develo
parent b6e58301af
commit 0399bb1fee
2 changed files with 5 additions and 3 deletions

View File

@ -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

View File

@ -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;