Safe Sprinkler
Master/slave irrigation system (ESP-NOW + LoRaWAN)
Loading...
Searching...
No Matches
Functions
config_serializer.h File Reference
#include "esp_log.h"
#include "general/node_cfg.h"
#include "master/main_master.h"
#include "nvs.h"
#include "nvs_flash.h"
#include "ttn_credentials.h"
#include <inttypes.h>
Include dependency graph for config_serializer.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int load_config (void)
 Load master configuration from NVS.
 
int save_config (void)
 Save master configuration to NVS.
 

Function Documentation

◆ load_config()

int load_config ( void  )

Load master configuration from NVS.

Loads TTN credentials (DevEUI, AppKey), moisture threshold, and slave data into global variables (e.g. LORAWAN_DEVEUI, configured_moisture, s_data).

Returns
ESP_OK on success, error code otherwise

◆ save_config()

int save_config ( void  )

Save master configuration to NVS.

Persists TTN credentials, moisture threshold, and slave data.

Returns
ESP_OK on success, error code otherwise