Use original names for config parameters
The config parameter names defined in the relay_chn_defs.h file have been changed back to their original names (with the CONFIG_ prefix), so that they are not confused with application-level defines. Refs #1085
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
#include "unity_test_runner.h"
|
||||
#include "test_common.h"
|
||||
|
||||
#if RELAY_CHN_ENABLE_NVS == 1
|
||||
#if CONFIG_RELAY_CHN_ENABLE_NVS == 1
|
||||
#include "nvs_flash.h"
|
||||
#include "relay_chn_nvs.h"
|
||||
#endif
|
||||
@@ -32,14 +32,14 @@ void tearDown()
|
||||
static void test_nvs_flash_init(void)
|
||||
{
|
||||
esp_err_t ret;
|
||||
#if RELAY_CHN_NVS_CUSTOM_PARTITION == 1
|
||||
ret = nvs_flash_init_partition(RELAY_CHN_NVS_CUSTOM_PARTITION_NAME);
|
||||
#if CONFIG_RELAY_CHN_NVS_CUSTOM_PARTITION == 1
|
||||
ret = nvs_flash_init_partition(CONFIG_RELAY_CHN_NVS_CUSTOM_PARTITION_NAME);
|
||||
ESP_LOGI(TEST_TAG, "test_nvs_flash_init: NVS flash init partition return: %s", esp_err_to_name(ret));
|
||||
if (ret == ESP_ERR_NVS_NO_FREE_PAGES || ret == ESP_ERR_NVS_NEW_VERSION_FOUND) {
|
||||
// NVS partition is truncated and needs to be erased
|
||||
ret = nvs_flash_erase_partition(RELAY_CHN_NVS_CUSTOM_PARTITION_NAME);
|
||||
ret = nvs_flash_erase_partition(CONFIG_RELAY_CHN_NVS_CUSTOM_PARTITION_NAME);
|
||||
if (ret == ESP_OK) {
|
||||
ret = nvs_flash_init_partition(RELAY_CHN_NVS_CUSTOM_PARTITION_NAME);
|
||||
ret = nvs_flash_init_partition(CONFIG_RELAY_CHN_NVS_CUSTOM_PARTITION_NAME);
|
||||
}
|
||||
}
|
||||
#else
|
||||
@@ -61,8 +61,8 @@ TEST_ESP_OK(ret);
|
||||
static void test_nvs_flash_deinit(void)
|
||||
{
|
||||
esp_err_t ret;
|
||||
#if RELAY_CHN_NVS_CUSTOM_PARTITION == 1
|
||||
ret = nvs_flash_deinit_partition(RELAY_CHN_NVS_CUSTOM_PARTITION_NAME);
|
||||
#if CONFIG_RELAY_CHN_NVS_CUSTOM_PARTITION == 1
|
||||
ret = nvs_flash_deinit_partition(CONFIG_RELAY_CHN_NVS_CUSTOM_PARTITION_NAME);
|
||||
#else
|
||||
ret = nvs_flash_deinit();
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user