Skip to content

Commit 72051ee

Browse files
committed
Inline, fewer LOC, remove redundant definition in cpp.
1 parent 5b767a3 commit 72051ee

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

cores/esp8266/Esp.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -264,13 +264,6 @@ uint8_t EspClass::getBootMode(void)
264264
return system_get_boot_mode();
265265
}
266266

267-
#ifndef F_CPU
268-
uint8_t EspClass::getCpuFreqMHz(void)
269-
{
270-
return system_get_cpu_freq();
271-
}
272-
#endif
273-
274267
uint32_t EspClass::getFlashChipId(void)
275268
{
276269
static uint32_t flash_chip_id = 0;

cores/esp8266/Esp.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,12 @@ class EspClass {
123123

124124
#if defined(F_CPU) || defined(CORE_MOCK)
125125
constexpr uint8_t getCpuFreqMHz() const
126+
#else
127+
uint8_t getCpuFreqMHz() const
128+
#endif
126129
{
127130
return esp_get_cpu_freq_mhz();
128131
}
129-
#else
130-
uint8_t getCpuFreqMHz() const;
131-
#endif
132132

133133
uint32_t getFlashChipId();
134134
uint8_t getFlashChipVendorId();

0 commit comments

Comments
 (0)