20 lines
500 B
C
20 lines
500 B
C
#pragma once
|
|
|
|
#include <stdbool.h>
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
|
|
#include "esp_err.h"
|
|
|
|
#define WIFI_STORE_SSID_MAX_LEN 32
|
|
#define WIFI_STORE_PASSWORD_MAX_LEN 64
|
|
|
|
typedef struct {
|
|
char ssid[WIFI_STORE_SSID_MAX_LEN + 1];
|
|
char password[WIFI_STORE_PASSWORD_MAX_LEN + 1];
|
|
} wifi_store_credentials_t;
|
|
|
|
esp_err_t wifi_store_load(wifi_store_credentials_t *credentials, bool *found);
|
|
esp_err_t wifi_store_save(const wifi_store_credentials_t *credentials);
|
|
esp_err_t wifi_store_erase(void);
|