46 lines
1.1 KiB
C
46 lines
1.1 KiB
C
/*
|
|
* @Date: 2024-07-18 13:45:02
|
|
* @LastEditors: lzc56 563451665@qq.com
|
|
* @LastEditTime: 2024-12-24 18:35:57
|
|
* @FilePath: \software\main\inc\drv_nvs.h
|
|
*/
|
|
/* MQTT (over TCP) Example
|
|
|
|
This example code is in the Public Domain (or CC0 licensed, at your option.)
|
|
|
|
Unless required by applicable law or agreed to in writing, this
|
|
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
CONDITIONS OF ANY KIND, either express or implied.
|
|
*/
|
|
|
|
#ifndef __DRV_NVS_H__
|
|
#define __DRV_NVS_H__
|
|
#include <main.h>
|
|
|
|
#include "esp_log.h"
|
|
#include "nvs_flash.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C"
|
|
{
|
|
#endif
|
|
|
|
#define NET_CONFIG_STORAGE_KEY "net_key"
|
|
#define NET_CONFIG_STORAGE_NAMESPACE "net_storage"
|
|
|
|
#define NET_RE_CONFIG_STORAGE_KEY "netReConfig_key"
|
|
#define NET_RE_CONFIG_STORAGE_NAMESPACE "netReConfig_storage"
|
|
|
|
esp_err_t nvs_read_netConfig(network_Config_t *pNetwork_Config);
|
|
esp_err_t nvs_write_netConfig(network_Config_t *pNetwork_Config, uint32_t len);
|
|
|
|
void write_reConfigFlag_to_nvs(char flag);
|
|
|
|
int read_reConfigFlag_from_nvs(void);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* __DRV_USART_H__ */
|