123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- #ifndef __CONFIG_H__
- #define __CONFIG_H__
- #include "esp_common.h"
- #include "user_config.h"
- typedef struct{
- uint32_t cfg_holder;
- uint8_t device_id[16];
- uint8_t sta_ssid[STORED_WIFI_APS][64];
- uint8_t sta_pwd[STORED_WIFI_APS][64];
- AUTH_MODE sta_type[STORED_WIFI_APS];
- uint32_t registered_stations;
- uint32_t current_station;
- uint8_t mqtt_host[64];
- uint32_t mqtt_port;
- uint8_t mqtt_user[32];
- uint8_t mqtt_pass[32];
- uint32_t mqtt_keepalive;
- uint32_t security;
- uint8_t ota_host[64];
- uint32_t ota_port;
- } System_Config_t;
- typedef struct {
- uint8 flag;
- uint8 pad[3];
- } Save_Flag_t;
- void ICACHE_FLASH_ATTR cfg_save();
- void ICACHE_FLASH_ATTR cfg_load();
- extern Save_Flag_t sysCfg;
- #endif
|