Program Listing for File HAL.hpp
↰ Return to documentation for file (doc/include/HAL.hpp
)
#ifndef HAL_HPP_
#define HAL_HPP_
#include <memory>
#include <string>
#include "HALThread.hpp"
#include "HTTPServer.hpp"
#include "LEDs.hpp"
#include "Modem.hpp"
#include "NetworkManager.hpp"
#include "OTA.hpp"
#include "RTC.hpp"
#include "Sleep.h"
class Timer; // Forward declaration of class with private header
#include "UserStore.hpp"
class FactoryInfo; // Forward declaration of class with private header
#include "PowerStatus.hpp"
#if defined(__ESPIDF__) && defined(__eVolve__)
#else
class UART; // Forward declaration of class with private header
class LEDs; // Forward declaration of class with private header
#endif
class HAL {
public:
static RTC& getRTC();
static Timer* getTimer();
static OTA& getOTA();
static NetworkManager& getNetworkManager();
static Modem& getModem();
static FactoryInfo& getFactoryInfo();
static void sleepS(const uint32_t s_time);
static void sleepMs(const uint32_t ms_time);
static void sleepUs(const uint32_t us_time);
static int64_t getUptimeSeconds();
static int64_t getFreeMemory();
static std::shared_ptr<UserStore> getUserStore(std::string id);
static int32_t reboot();
static std::string getDeviceModel();
static uint32_t getFactoryResetButtonCounter();
static PowerStatus& getPowerStatus();
static HTTPServer& getHTTPServer();
#if defined(__ESPIDF__) && defined(__eVolve__)
#else
static LEDs& getLEDs();
static UART& getUART();
#endif
using Thread = HALThread;
};
#endif // HAL_HPP_