C++ refactoring (#91)

This commit is contained in:
Ken Van Hoeylandt
2024-11-26 17:51:05 +01:00
committed by GitHub
parent d06137ba76
commit ca5d4b8226
159 changed files with 904 additions and 1086 deletions
@@ -0,0 +1,27 @@
#pragma once
#include "WifiGlobals.h"
namespace tt::service::wifi::settings {
/**
* This struct is stored as-is into NVS flash.
*
* The SSID and secret are increased by 1 byte to facilitate string null termination.
* This makes it easier to use the char array as a string in various places.
*/
typedef struct {
char ssid[TT_WIFI_SSID_LIMIT + 1];
char password[TT_WIFI_CREDENTIALS_PASSWORD_LIMIT + 1];
bool auto_connect;
} WifiApSettings;
bool contains(const char* ssid);
bool load(const char* ssid, WifiApSettings* settings);
bool save(const WifiApSettings* settings);
bool remove(const char* ssid);
} // namespace