Class HAL

Class Documentation

class HAL

This class represents the Hardware Abstraction Layer classes. It allows to compile in Linux or ESP-IDF port in a transparent manner.

Public Types

using Thread = HALThread

Thread implementation optimized for the platform.

Public Static Functions

static RTC &getRTC()

Obtains reference to singleton class RTC.

static Timer *getTimer()

Obtains reference to singleton class Timer.

static OTA &getOTA()

Obtains reference to singleton class OTA.

static NetworkManager &getNetworkManager()

Obtains reference to singleton class NetworkManager.

static Modem &getModem()

Obtains reference to singleton class Modem.

static FactoryInfo &getFactoryInfo()
static void sleepS(const uint32_t s_time)

Sleeps for specified number of seconds.

Parameters

s_time -- [in] seconds to sleep.

static void sleepMs(const uint32_t ms_time)

Sleeps for specified number of milliseconds.

Parameters

ms_time -- [in] milliseconds to sleep.

static void sleepUs(const uint32_t us_time)

Sleeps for specified number of microseconds.

Parameters

us_time -- [in] microseconds to sleep.

static int64_t getUptimeSeconds()

Gets system uptime in seconds.

static int64_t getFreeMemory()

Gets free system memory in bytes.

static std::shared_ptr<UserStore> getUserStore(std::string id)

Obtains an instance of the User Store class.

static int32_t reboot()

Reboot the system.

static std::string getDeviceModel()

Get device model.

static uint32_t getFactoryResetButtonCounter()

Get the number of times the factory reset button has been pressed.

static PowerStatus &getPowerStatus()

Obtains reference to singleton class PowerStatus.

static HTTPServer &getHTTPServer()

Obtains reference to singleton class HTTPServer.

static LEDs &getLEDs()

Obtains reference to singleton class LEDs.

static UART &getUART()

Obtains reference to singleton class UART.