mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-10-21 15:32:02 +08:00
feat(nvs_flash): Modify for ESP8266
This commit is contained in:
@@ -204,15 +204,15 @@ static const char* PHY_NAMESPACE = "phy";
|
||||
static const char* PHY_CAL_DATA_KEY = "cal_data";
|
||||
static const char* PHY_RX_GAIN_DC_TABLE_KEY = "dc_table";
|
||||
|
||||
static esp_err_t load_cal_data_from_nvs_handle(nvs_handle handle,
|
||||
static esp_err_t load_cal_data_from_nvs_handle(nvs_handle_t handle,
|
||||
esp_phy_calibration_data_t* out_cal_data);
|
||||
|
||||
static esp_err_t store_cal_data_to_nvs_handle(nvs_handle handle,
|
||||
static esp_err_t store_cal_data_to_nvs_handle(nvs_handle_t handle,
|
||||
const esp_phy_calibration_data_t* cal_data);
|
||||
|
||||
esp_err_t esp_phy_load_cal_data_from_nvs(esp_phy_calibration_data_t* out_cal_data)
|
||||
{
|
||||
nvs_handle handle;
|
||||
nvs_handle_t handle;
|
||||
esp_err_t err = nvs_open(PHY_NAMESPACE, NVS_READONLY, &handle);
|
||||
|
||||
if (err == ESP_ERR_NVS_NOT_INITIALIZED) {
|
||||
@@ -230,7 +230,7 @@ esp_err_t esp_phy_load_cal_data_from_nvs(esp_phy_calibration_data_t* out_cal_dat
|
||||
|
||||
esp_err_t esp_phy_store_cal_data_to_nvs(const esp_phy_calibration_data_t* cal_data)
|
||||
{
|
||||
nvs_handle handle;
|
||||
nvs_handle_t handle;
|
||||
esp_err_t err = nvs_open(PHY_NAMESPACE, NVS_READWRITE, &handle);
|
||||
|
||||
if (err != ESP_OK) {
|
||||
@@ -243,7 +243,7 @@ esp_err_t esp_phy_store_cal_data_to_nvs(const esp_phy_calibration_data_t* cal_da
|
||||
}
|
||||
}
|
||||
|
||||
static esp_err_t load_cal_data_from_nvs_handle(nvs_handle handle,
|
||||
static esp_err_t load_cal_data_from_nvs_handle(nvs_handle_t handle,
|
||||
esp_phy_calibration_data_t* out_cal_data)
|
||||
{
|
||||
esp_err_t err;
|
||||
@@ -278,7 +278,7 @@ static esp_err_t load_cal_data_from_nvs_handle(nvs_handle handle,
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
static esp_err_t store_cal_data_to_nvs_handle(nvs_handle handle,
|
||||
static esp_err_t store_cal_data_to_nvs_handle(nvs_handle_t handle,
|
||||
const esp_phy_calibration_data_t* cal_data)
|
||||
{
|
||||
esp_err_t err;
|
||||
|
@@ -136,7 +136,7 @@ static const char *BACKUP_MAC_DATA_KEY = "backup_mac_data";
|
||||
static esp_err_t load_backup_mac_data(uint8_t *mac)
|
||||
{
|
||||
esp_err_t err;
|
||||
nvs_handle handle;
|
||||
nvs_handle_t handle;
|
||||
uint32_t efuse[4];
|
||||
uint8_t efuse_crc = 0;
|
||||
uint8_t calc_crc = 0;
|
||||
@@ -221,7 +221,7 @@ static esp_err_t load_backup_mac_data(uint8_t *mac)
|
||||
static esp_err_t store_backup_mac_data()
|
||||
{
|
||||
esp_err_t err;
|
||||
nvs_handle handle;
|
||||
nvs_handle_t handle;
|
||||
uint32_t efuse[4];
|
||||
efuse[0] = REG_READ(EFUSE_DATA0_REG);
|
||||
efuse[1] = REG_READ(EFUSE_DATA1_REG);
|
||||
|
Reference in New Issue
Block a user