Files
renderbug-cpp/src/Hal.h

31 lines
718 B
C++

#pragma once
struct BootOptions;
typedef enum {
HAL_UNKNOWN,
HAL_ESP32,
HAL_ESP8266
} HalBackend;
constexpr HalBackend DefaultBackend = HAL_ESP8266;
template<HalBackend Backend = DefaultBackend>
class PlatformImpl {
public:
static const char* name();
static const char* version();
static int freeRam();
static void startWatchdog();
static void startNTP();
static bool getLocalTime(struct tm* timedata, int timezone);
static void loop();
static const char* deviceID();
__attribute__((noreturn)) static void restart();
static void bootSplash();
static void printCrashInfo();
static void initBootOptions(BootOptions& opts);
static void forceSafeMode();
};