Skip to content

Commit 08927ba

Browse files
committed
Fix build for host - getCpuFreqMHz there was also in conflict with getCycleCount, using F_CPU:
tests/host/common/mock.h:#define F_CPU 80000000 (!)
1 parent 9968a62 commit 08927ba

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

Diff for: cores/esp8266/Esp.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ class EspClass {
157157
uint8_t getBootVersion();
158158
uint8_t getBootMode();
159159

160-
#if !defined(CORE_MOCK) && defined(F_CPU)
160+
#if defined(F_CPU)
161161
constexpr uint8_t getCpuFreqMHz() const
162162
{
163163
return clockCyclesPerMicrosecond();
@@ -166,7 +166,6 @@ class EspClass {
166166
uint8_t getCpuFreqMHz();
167167
#endif
168168

169-
170169
uint32_t getFlashChipId();
171170
uint8_t getFlashChipVendorId();
172171

Diff for: tests/host/common/MockEsp.cpp

-5
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,6 @@ uint32_t EspClass::getFreeSketchSpace()
118118
return 4 * 1024 * 1024;
119119
}
120120

121-
uint8_t EspClass::getCpuFreqMHz()
122-
{
123-
return F_CPU / 1000000;
124-
}
125-
126121
const char *EspClass::getSdkVersion()
127122
{
128123
return "2.5.0";

0 commit comments

Comments
 (0)