You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
764 B
36 lines
764 B
#ifndef COMPONENTS_FIRMWARE_WIFI_H |
|
#define COMPONENTS_FIRMWARE_WIFI_H |
|
|
|
#include <stdint.h> |
|
#include <stddef.h> |
|
#include <stdbool.h> |
|
|
|
typedef enum WifiMode { |
|
NX_WIFI_MODE_STA = 0, |
|
NX_WIFI_MODE_AP = 1 |
|
} WifiMode; |
|
|
|
typedef struct WifiSettings { |
|
char* wname; //ssid |
|
char* wpass; |
|
const char* devicePrefix; |
|
bool* usePowerSave; |
|
bool* useStaticAddr; |
|
uint8_t* ip4addr; |
|
uint8_t* ip4gw; |
|
uint8_t* ip4mask; |
|
uint8_t* dns; |
|
WifiMode mode; |
|
} WifiSettings; |
|
|
|
typedef void (*WifiCallback)(); |
|
|
|
typedef bool (*StorageReadFn)(const char* key, void* data, size_t size); |
|
|
|
bool nxInitWifi(WifiSettings* wifiSettings); |
|
|
|
void nxSetWifiConnectedCallback(WifiCallback callback); |
|
void nxSetWifiErrorCallback(WifiCallback callback); |
|
|
|
|
|
#endif // COMPONENTS_FIRMWARE_WIFI_H
|
|
|