diff --git a/test/emul/Arduino.h b/test/emul/Arduino.h index 092d6424..5abc6edb 100644 --- a/test/emul/Arduino.h +++ b/test/emul/Arduino.h @@ -7,6 +7,7 @@ #include #include "HardwareSerial.h" +#include "Logging.h" #include "Print.h" #include "esp-hal-gpio.h" diff --git a/test/emul/Logging.h b/test/emul/Logging.h new file mode 100644 index 00000000..49388f3e --- /dev/null +++ b/test/emul/Logging.h @@ -0,0 +1,24 @@ +#ifndef LOGGING_H +#define LOGGING_H + +#include +#include + +class Logging { + public: + static void printf(const char* format, ...) { + va_list args; + va_start(args, format); + vprintf(format, args); + va_end(args); + } + + static void println(const char* message) { printf("%s\n", message); } + + static void print(const char* message) { printf("%s", message); } +}; + +// Global logging instance +extern Logging logging; + +#endif