diff --git a/tests/host/common/MockEsp.cpp b/tests/host/common/MockEsp.cpp index 12cb37686f..7410c4cbbf 100644 --- a/tests/host/common/MockEsp.cpp +++ b/tests/host/common/MockEsp.cpp @@ -105,6 +105,40 @@ uint32_t EspClass::getFreeHeap() return 30000; } +String EspClass::getResetReason() +{ + return "Power on"; +} + +uint32_t EspClass::getFreeSketchSpace() +{ + return 4 * 1024 * 1024; +} + +uint8_t EspClass::getCpuFreqMHz() +{ + return 160; +} + +const char *EspClass::getSdkVersion() +{ + return "2.5.0"; +} + +uint32_t EspClass::getFlashChipSpeed() +{ + return 40; +} + +void EspClass::getHeapStats(uint32_t* hfree, uint16_t* hmax, uint8_t* hfrag) { + uint32_t hf = 10 * 1024; + float hm = 1 * 1024; + + if (hfree) *hfree = hf; + if (hmax) *hmax = hm; + if (hfrag) *hfrag = 100 - (sqrt(hm) * 100) / hf; +} + bool EspClass::flashEraseSector(uint32_t sector) { return true;