|
TinyWifiDongle 0.1.0
Header-only USB WiFi dongle for Arduino
|
Keeps the name and password of one WiFi network in flash. More...
#include <CredentialStore.h>
Public Member Functions | |
| bool | load () |
| Reads the flash. Returns true if a network is saved. | |
| bool | valid () const |
| True if a network is saved (after load() or save()). | |
| bool | save (const char *ssid, const char *password) |
| Saves the network; an empty or null password means an open network. False if the flash could not be written. | |
| bool | forget () |
| Removes the saved network. False if the flash could not be written. | |
| const char * | ssid () const |
| Name of the saved network. | |
| const char * | password () const |
| Password of the saved network, nullptr if it is an open network. | |
Keeps the name and password of one WiFi network in flash.
Uses the EEPROM emulation that both the ESP32 and the Raspberry Pi Pico cores provide, so no filesystem partition is needed. The data is marked, so flash that was never written by this class reads as "nothing saved".
Definition at line 14 of file CredentialStore.h.
|
inline |
Removes the saved network. False if the flash could not be written.
Definition at line 36 of file CredentialStore.h.
|
inline |
Reads the flash. Returns true if a network is saved.
Definition at line 17 of file CredentialStore.h.
|
inline |
Password of the saved network, nullptr if it is an open network.
Definition at line 45 of file CredentialStore.h.
|
inline |
Saves the network; an empty or null password means an open network. False if the flash could not be written.
Definition at line 27 of file CredentialStore.h.
|
inline |
Name of the saved network.
Definition at line 42 of file CredentialStore.h.
|
inline |
True if a network is saved (after load() or save()).
Definition at line 24 of file CredentialStore.h.