Ersa Wearable Platform
Embedded smartwatch firmware and application framework
Loading...
Searching...
No Matches
wifi.h
Go to the documentation of this file.
1#pragma once
2
3#include "ersa/common/types.h"
4#include <stddef.h>
5
6namespace ersa {
7namespace hal {
8
11
12// Wi-Fi radio and link control. Socket and HTTP protocols sit above this HAL.
22public:
23 virtual ~IWifiRadio() = default;
25 virtual Result<void> init() = 0;
27 virtual void enableStation() = 0;
35 virtual void connectStation(const char* ssid, const char* password, bool powerSave) = 0;
37 virtual WifiState state() const = 0;
39 virtual bool copyLocalAddress(char* output, size_t capacity) const = 0;
44 virtual Result<void> startAccessPoint(const char* ssid, const char* password) = 0;
46 virtual void stopAccessPoint() = 0;
48 virtual bool copyAccessPointAddress(char* output, size_t capacity) const = 0;
50 virtual void disconnect(bool powerOff) = 0;
51};
52
53} // namespace hal
54} // namespace ersa
Definition types.h:52
Definition wifi.h:21
virtual void disconnect(bool powerOff)=0
virtual void connectStation(const char *ssid, const char *password, bool powerSave)=0
virtual WifiState state() const =0
Return the current station/radio state.
virtual void enableStation()=0
virtual void stopAccessPoint()=0
Stop access point mode.
virtual ~IWifiRadio()=default
virtual Result< void > init()=0
virtual Result< void > startAccessPoint(const char *ssid, const char *password)=0
virtual bool copyAccessPointAddress(char *output, size_t capacity) const =0
Copy the access point address into a caller-owned buffer.
virtual bool copyLocalAddress(char *output, size_t capacity) const =0
WifiState
Definition wifi.h:10
Definition application.h:10