File tree Expand file tree Collapse file tree 1 file changed +7
-13
lines changed Expand file tree Collapse file tree 1 file changed +7
-13
lines changed Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ class EspClass {
124124#if defined(F_CPU) || defined(CORE_MOCK)
125125 constexpr
126126#endif
127- uint8_t getCpuFreqMHz () const
127+ inline uint8_t getCpuFreqMHz () const __attribute__((always_inline))
128128 {
129129 return esp_get_cpu_freq_mhz ();
130130 }
@@ -166,21 +166,15 @@ class EspClass {
166166 uint8_t *random (uint8_t *resultArray, const size_t outputSizeBytes) const ;
167167 uint32_t random () const ;
168168
169- #ifndef CORE_MOCK
170- inline uint32_t getCycleCount () __attribute__((always_inline));
169+ #if !defined(CORE_MOCK)
170+ inline uint32_t getCycleCount () __attribute__((always_inline))
171+ {
172+ return esp_get_cycle_count ();
173+ }
171174#else
172175 uint32_t getCycleCount ();
173- #endif
174- };
175-
176- #ifndef CORE_MOCK
177-
178- uint32_t EspClass::getCycleCount ()
179- {
180- return esp_get_cycle_count ();
181- }
182-
183176#endif // !defined(CORE_MOCK)
177+ };
184178
185179extern EspClass ESP;
186180
You can’t perform that action at this time.
0 commit comments