File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -264,11 +264,6 @@ uint8_t EspClass::getBootMode(void)
264
264
return system_get_boot_mode ();
265
265
}
266
266
267
- uint8_t EspClass::getCpuFreqMHz (void )
268
- {
269
- return system_get_cpu_freq ();
270
- }
271
-
272
267
273
268
uint32_t EspClass::getFlashChipId (void )
274
269
{
Original file line number Diff line number Diff line change @@ -157,7 +157,12 @@ class EspClass {
157
157
uint8_t getBootVersion ();
158
158
uint8_t getBootMode ();
159
159
160
+ #ifndef CORE_MOCK
161
+ inline uint8_t getCpuFreqMHz () __attribute__((always_inline));
162
+ #else
160
163
uint8_t getCpuFreqMHz ();
164
+ #endif
165
+
161
166
162
167
uint32_t getFlashChipId ();
163
168
uint8_t getFlashChipVendorId ();
@@ -201,6 +206,12 @@ class EspClass {
201
206
};
202
207
203
208
#ifndef CORE_MOCK
209
+
210
+ uint8_t EspClass::getCpuFreqMHz ()
211
+ {
212
+ return clockCyclesPerMicrosecond ();
213
+ }
214
+
204
215
uint32_t EspClass::getCycleCount ()
205
216
{
206
217
return esp_get_cycle_count ();
You can’t perform that action at this time.
0 commit comments