From 8494463926a7802b20bfbee2c62c19c7435d52b4 Mon Sep 17 00:00:00 2001 From: Jaakko Haakana Date: Fri, 22 Aug 2025 21:44:24 +0300 Subject: [PATCH] Add mock ESP class --- test/emul/Arduino.cpp | 2 ++ test/emul/Arduino.h | 11 +++++++++++ 2 files changed, 13 insertions(+) diff --git a/test/emul/Arduino.cpp b/test/emul/Arduino.cpp index 1f6940df..bdaa38d8 100644 --- a/test/emul/Arduino.cpp +++ b/test/emul/Arduino.cpp @@ -14,3 +14,5 @@ void pinMode(uint8_t pin, uint8_t mode) {} int max(int a, int b) { return (a > b) ? a : b; } + +ESPClass ESP; diff --git a/test/emul/Arduino.h b/test/emul/Arduino.h index 8024518d..5b8b13f1 100644 --- a/test/emul/Arduino.h +++ b/test/emul/Arduino.h @@ -24,4 +24,15 @@ void delay(unsigned long ms); void delayMicroseconds(unsigned long us); int max(int a, int b); +class ESPClass { +public: + size_t getFlashChipSize() { + // This is a placeholder for the actual implementation + // that retrieves the flash chip size. + return 4 * 1024 * 1024; // Example: returning 4MB + } +}; + +extern ESPClass ESP; + #endif