Added saving the configuration in NVS memory
This commit is contained in:
@ -43,8 +43,10 @@
|
||||
#define ZH_CHIP_TYPE HACHT_ESP32C6
|
||||
#endif
|
||||
|
||||
#define ZH_LAN_MODULE_TYPE(x) esp_eth_phy_new_rtl8201(x) // Change it according to the LAN module used.
|
||||
#define ZH_LAN_MODULE_POWER_PIN GPIO_NUM_12 // Change it according to the LAN module used.
|
||||
#define ZH_LAN_MODULE_TYPE(x) esp_eth_phy_new_rtl8201(x) // For LILYGO T-ETH-Lite ESP32.
|
||||
#define ZH_LAN_MODULE_POWER_PIN GPIO_NUM_12 // For LILYGO T-ETH-Lite ESP32.
|
||||
// #define ZH_LAN_MODULE_TYPE(x) esp_eth_phy_new_lan87xx(x) // For Wireless-Tag WT32-ETH01.
|
||||
// #define ZH_LAN_MODULE_POWER_PIN GPIO_NUM_16 // For Wireless-Tag WT32-ETH01.
|
||||
|
||||
#define ZH_WIFI_MAXIMUM_RETRY 5 // Maximum number of unsuccessful WiFi connection attempts.
|
||||
#define ZH_WIFI_RECONNECT_TIME 5 // Waiting time (in seconds) between attempts to reconnect to WiFi (if number of attempts of unsuccessful connections is exceeded).
|
||||
@ -63,7 +65,7 @@
|
||||
|
||||
typedef struct // Structure of data exchange between tasks, functions and event handlers.
|
||||
{
|
||||
struct
|
||||
struct // Storage structure of gateway configuration data.
|
||||
{
|
||||
bool is_lan_mode; // Ethernet work mode flag.
|
||||
char ssid_name[32]; // WiFi SSID name.
|
||||
@ -71,7 +73,7 @@ typedef struct // Structure of data exchange between tasks, functions and event
|
||||
char mqtt_broker_url[64]; // MQTT broker url.
|
||||
char mqtt_topic_prefix[32]; // MQTT topic prefix.
|
||||
char ntp_server_url[64]; // NTP server url.
|
||||
char ntp_time_zone[12]; // NTP time zone.
|
||||
char ntp_time_zone[10]; // NTP time zone.
|
||||
char firmware_upgrade_url[64]; // Firmware upgrade url.
|
||||
} software_config;
|
||||
uint8_t self_mac[6]; // Gateway MAC address. @note Depends at WiFi operation mode.
|
||||
|
Reference in New Issue
Block a user