From: Roland Dobai Date: Thu, 9 May 2019 14:43:06 +0000 (+0200) Subject: Rename Kconfig options (examples) X-Git-Tag: v4.0-beta1~317^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=151f757912c0de4bc85ad1d2c68c8ce743914ca5;p=esp-idf Rename Kconfig options (examples) --- diff --git a/examples/bluetooth/a2dp_gatts_coex/main/Kconfig.projbuild b/examples/bluetooth/a2dp_gatts_coex/main/Kconfig.projbuild index 2f988267ac..73f6d669f8 100644 --- a/examples/bluetooth/a2dp_gatts_coex/main/Kconfig.projbuild +++ b/examples/bluetooth/a2dp_gatts_coex/main/Kconfig.projbuild @@ -1,41 +1,41 @@ menu "A2DP Example Configuration" - choice A2DP_SINK_OUTPUT + choice EXAMPLE_A2DP_SINK_OUTPUT prompt "A2DP Sink Output" - default A2DP_SINK_OUTPUT_EXTERNAL_I2S + default EXAMPLE_A2DP_SINK_OUTPUT_EXTERNAL_I2S help Select to use Internal DAC or external I2S driver - config A2DP_SINK_OUTPUT_INTERNAL_DAC + config EXAMPLE_A2DP_SINK_OUTPUT_INTERNAL_DAC bool "Internal DAC" help Select this to use Internal DAC sink output - config A2DP_SINK_OUTPUT_EXTERNAL_I2S + config EXAMPLE_A2DP_SINK_OUTPUT_EXTERNAL_I2S bool "External I2S Codec" help Select this to use External I2S sink output endchoice - config I2S_LRCK_PIN + config EXAMPLE_I2S_LRCK_PIN int "I2S LRCK (WS) GPIO" default 22 - depends on A2DP_SINK_OUTPUT_EXTERNAL_I2S + depends on EXAMPLE_A2DP_SINK_OUTPUT_EXTERNAL_I2S help GPIO number to use for I2S LRCK(WS) Driver. - config I2S_BCK_PIN + config EXAMPLE_I2S_BCK_PIN int "I2S BCK GPIO" default 26 - depends on A2DP_SINK_OUTPUT_EXTERNAL_I2S + depends on EXAMPLE_A2DP_SINK_OUTPUT_EXTERNAL_I2S help GPIO number to use for I2S BCK Driver. - config I2S_DATA_PIN + config EXAMPLE_I2S_DATA_PIN int "I2S DATA GPIO" default 25 - depends on A2DP_SINK_OUTPUT_EXTERNAL_I2S + depends on EXAMPLE_A2DP_SINK_OUTPUT_EXTERNAL_I2S help GPIO number to use for I2S Data Driver. diff --git a/examples/bluetooth/a2dp_gatts_coex/main/main.c b/examples/bluetooth/a2dp_gatts_coex/main/main.c index 7076d7e483..466a2ce8d6 100644 --- a/examples/bluetooth/a2dp_gatts_coex/main/main.c +++ b/examples/bluetooth/a2dp_gatts_coex/main/main.c @@ -680,7 +680,7 @@ void app_main() ESP_ERROR_CHECK(err); i2s_config_t i2s_config = { -#ifdef CONFIG_A2DP_SINK_OUTPUT_INTERNAL_DAC +#ifdef CONFIG_EXAMPLE_A2DP_SINK_OUTPUT_INTERNAL_DAC .mode = I2S_MODE_MASTER | I2S_MODE_TX | I2S_MODE_DAC_BUILT_IN, #else .mode = I2S_MODE_MASTER | I2S_MODE_TX, // Only TX @@ -697,14 +697,14 @@ void app_main() i2s_driver_install(0, &i2s_config, 0, NULL); -#ifdef CONFIG_A2DP_SINK_OUTPUT_INTERNAL_DAC +#ifdef CONFIG_EXAMPLE_A2DP_SINK_OUTPUT_INTERNAL_DAC i2s_set_dac_mode(I2S_DAC_CHANNEL_BOTH_EN); i2s_set_pin(0, NULL); #else i2s_pin_config_t pin_config = { - .bck_io_num = CONFIG_I2S_BCK_PIN, - .ws_io_num = CONFIG_I2S_LRCK_PIN, - .data_out_num = CONFIG_I2S_DATA_PIN, + .bck_io_num = CONFIG_EXAMPLE_I2S_BCK_PIN, + .ws_io_num = CONFIG_EXAMPLE_I2S_LRCK_PIN, + .data_out_num = CONFIG_EXAMPLE_I2S_DATA_PIN, .data_in_num = -1 //Not used }; diff --git a/examples/bluetooth/a2dp_sink/main/Kconfig.projbuild b/examples/bluetooth/a2dp_sink/main/Kconfig.projbuild index 2f988267ac..73f6d669f8 100644 --- a/examples/bluetooth/a2dp_sink/main/Kconfig.projbuild +++ b/examples/bluetooth/a2dp_sink/main/Kconfig.projbuild @@ -1,41 +1,41 @@ menu "A2DP Example Configuration" - choice A2DP_SINK_OUTPUT + choice EXAMPLE_A2DP_SINK_OUTPUT prompt "A2DP Sink Output" - default A2DP_SINK_OUTPUT_EXTERNAL_I2S + default EXAMPLE_A2DP_SINK_OUTPUT_EXTERNAL_I2S help Select to use Internal DAC or external I2S driver - config A2DP_SINK_OUTPUT_INTERNAL_DAC + config EXAMPLE_A2DP_SINK_OUTPUT_INTERNAL_DAC bool "Internal DAC" help Select this to use Internal DAC sink output - config A2DP_SINK_OUTPUT_EXTERNAL_I2S + config EXAMPLE_A2DP_SINK_OUTPUT_EXTERNAL_I2S bool "External I2S Codec" help Select this to use External I2S sink output endchoice - config I2S_LRCK_PIN + config EXAMPLE_I2S_LRCK_PIN int "I2S LRCK (WS) GPIO" default 22 - depends on A2DP_SINK_OUTPUT_EXTERNAL_I2S + depends on EXAMPLE_A2DP_SINK_OUTPUT_EXTERNAL_I2S help GPIO number to use for I2S LRCK(WS) Driver. - config I2S_BCK_PIN + config EXAMPLE_I2S_BCK_PIN int "I2S BCK GPIO" default 26 - depends on A2DP_SINK_OUTPUT_EXTERNAL_I2S + depends on EXAMPLE_A2DP_SINK_OUTPUT_EXTERNAL_I2S help GPIO number to use for I2S BCK Driver. - config I2S_DATA_PIN + config EXAMPLE_I2S_DATA_PIN int "I2S DATA GPIO" default 25 - depends on A2DP_SINK_OUTPUT_EXTERNAL_I2S + depends on EXAMPLE_A2DP_SINK_OUTPUT_EXTERNAL_I2S help GPIO number to use for I2S Data Driver. diff --git a/examples/bluetooth/a2dp_sink/main/main.c b/examples/bluetooth/a2dp_sink/main/main.c index 7e709a6e96..adaf8ff43b 100644 --- a/examples/bluetooth/a2dp_sink/main/main.c +++ b/examples/bluetooth/a2dp_sink/main/main.c @@ -53,7 +53,7 @@ void app_main() ESP_ERROR_CHECK(err); i2s_config_t i2s_config = { -#ifdef CONFIG_A2DP_SINK_OUTPUT_INTERNAL_DAC +#ifdef CONFIG_EXAMPLE_A2DP_SINK_OUTPUT_INTERNAL_DAC .mode = I2S_MODE_MASTER | I2S_MODE_TX | I2S_MODE_DAC_BUILT_IN, #else .mode = I2S_MODE_MASTER | I2S_MODE_TX, // Only TX @@ -70,14 +70,14 @@ void app_main() i2s_driver_install(0, &i2s_config, 0, NULL); -#ifdef CONFIG_A2DP_SINK_OUTPUT_INTERNAL_DAC +#ifdef CONFIG_EXAMPLE_A2DP_SINK_OUTPUT_INTERNAL_DAC i2s_set_dac_mode(I2S_DAC_CHANNEL_BOTH_EN); i2s_set_pin(0, NULL); #else i2s_pin_config_t pin_config = { - .bck_io_num = CONFIG_I2S_BCK_PIN, - .ws_io_num = CONFIG_I2S_LRCK_PIN, - .data_out_num = CONFIG_I2S_DATA_PIN, + .bck_io_num = CONFIG_EXAMPLE_I2S_BCK_PIN, + .ws_io_num = CONFIG_EXAMPLE_I2S_LRCK_PIN, + .data_out_num = CONFIG_EXAMPLE_I2S_DATA_PIN, .data_in_num = -1 //Not used }; diff --git a/examples/bluetooth/ble_throughput/throughput_server/main/Kconfig b/examples/bluetooth/ble_throughput/throughput_server/main/Kconfig index b2824c6d72..a5e9a858ab 100644 --- a/examples/bluetooth/ble_throughput/throughput_server/main/Kconfig +++ b/examples/bluetooth/ble_throughput/throughput_server/main/Kconfig @@ -1,6 +1,6 @@ menu "Example 'GATT SERVER THROUGHPUT' Config" - config SET_RAW_ADV_DATA + config EXAMPLE_SET_RAW_ADV_DATA bool "Use raw data for advertising packets and scan response data" help If this config item is set, raw binary data will be used to generate advertising & scan response data. @@ -11,17 +11,17 @@ menu "Example 'GATT SERVER THROUGHPUT' Config" esp_ble_adv_data_t structure. The lower layer will generate the BLE packets. This option has higher overhead at runtime. - config GATTS_NOTIFY_THROUGHPUT + config EXAMPLE_GATTS_NOTIFY_THROUGHPUT bool "test the gatts notify throughput" help - If this config item is set, then the 'GATTC_WRITE_THROUGHPUT' config should be close, it can't test both - write or notify at the same time at this demo + If this config item is set, then the 'EXAMPLE_GATTC_WRITE_THROUGHPUT' config should be close, it can't test + both write or notify at the same time at this demo - config GATTC_WRITE_THROUGHPUT + config EXAMPLE_GATTC_WRITE_THROUGHPUT bool "test the gattc write throughput" help - If this config item is set, then the 'GATTS_NOTIFY_THROUGHPUT' config should be close, it can't test both - write or notify at the same time at this demo + If this config item is set, then the 'EXAMPLE_GATTS_NOTIFY_THROUGHPUT' config should be close, it can't + test both write or notify at the same time at this demo endmenu diff --git a/examples/bluetooth/ble_throughput/throughput_server/main/example_ble_server_throughput.c b/examples/bluetooth/ble_throughput/throughput_server/main/example_ble_server_throughput.c index 59a36a01ac..3467104f34 100644 --- a/examples/bluetooth/ble_throughput/throughput_server/main/example_ble_server_throughput.c +++ b/examples/bluetooth/ble_throughput/throughput_server/main/example_ble_server_throughput.c @@ -38,20 +38,20 @@ #define GATTS_TAG "GATTS_DEMO" -#if (CONFIG_GATTS_NOTIFY_THROUGHPUT) +#if (CONFIG_EXAMPLE_GATTS_NOTIFY_THROUGHPUT) #define GATTS_NOTIFY_LEN 490 static SemaphoreHandle_t gatts_semaphore; static bool can_send_notify = false; static uint8_t indicate_data[GATTS_NOTIFY_LEN] = {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a}; -#endif /* #if (CONFIG_GATTS_NOTIFY_THROUGHPUT) */ +#endif /* #if (CONFIG_EXAMPLE_GATTS_NOTIFY_THROUGHPUT) */ -#if (CONFIG_GATTC_WRITE_THROUGHPUT) +#if (CONFIG_EXAMPLE_GATTC_WRITE_THROUGHPUT) static bool start = false; static uint64_t write_len = 0; static uint64_t start_time = 0; static uint64_t current_time = 0; -#endif /* #if (CONFIG_GATTC_WRITE_THROUGHPUT) */ +#endif /* #if (CONFIG_EXAMPLE_GATTC_WRITE_THROUGHPUT) */ static bool is_connecet = false; ///Declare the static function @@ -88,7 +88,7 @@ static uint8_t adv_config_done = 0; #define adv_config_flag (1 << 0) #define scan_rsp_config_flag (1 << 1) -#ifdef CONFIG_SET_RAW_ADV_DATA +#ifdef CONFIG_EXAMPLE_SET_RAW_ADV_DATA static uint8_t raw_adv_data[] = { 0x02, 0x01, 0x06, 0x02, 0x0a, 0xeb, 0x03, 0x03, 0xab, 0xcd @@ -142,7 +142,7 @@ static esp_ble_adv_data_t scan_rsp_data = { .flag = (ESP_BLE_ADV_FLAG_GEN_DISC | ESP_BLE_ADV_FLAG_BREDR_NOT_SPT), }; -#endif /* CONFIG_SET_RAW_ADV_DATA */ +#endif /* CONFIG_EXAMPLE_SET_RAW_ADV_DATA */ static esp_ble_adv_params_t adv_params = { .adv_int_min = 0x20, @@ -214,7 +214,7 @@ static uint8_t check_sum(uint8_t *addr, uint16_t count) static void gap_event_handler(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t *param) { switch (event) { -#ifdef CONFIG_SET_RAW_ADV_DATA +#ifdef CONFIG_EXAMPLE_SET_RAW_ADV_DATA case ESP_GAP_BLE_ADV_DATA_RAW_SET_COMPLETE_EVT: adv_config_done &= (~adv_config_flag); if (adv_config_done==0){ @@ -341,7 +341,7 @@ static void gatts_profile_a_event_handler(esp_gatts_cb_event_t event, esp_gatt_i if (set_dev_name_ret){ ESP_LOGE(GATTS_TAG, "set device name failed, error code = %x", set_dev_name_ret); } -#ifdef CONFIG_SET_RAW_ADV_DATA +#ifdef CONFIG_EXAMPLE_SET_RAW_ADV_DATA esp_err_t raw_adv_ret = esp_ble_gap_config_adv_data_raw(raw_adv_data, sizeof(raw_adv_data)); if (raw_adv_ret){ ESP_LOGE(GATTS_TAG, "config raw adv data failed, error code = %x ", raw_adv_ret); @@ -384,7 +384,7 @@ static void gatts_profile_a_event_handler(esp_gatts_cb_event_t event, esp_gatt_i break; } case ESP_GATTS_WRITE_EVT: { -#if (CONFIG_GATTS_NOTIFY_THROUGHPUT) +#if (CONFIG_EXAMPLE_GATTS_NOTIFY_THROUGHPUT) ESP_LOGI(GATTS_TAG, "GATT_WRITE_EVT, conn_id %d, trans_id %d, handle %d", param->write.conn_id, param->write.trans_id, param->write.handle); if (!param->write.is_prep){ ESP_LOGI(GATTS_TAG, "GATT_WRITE_EVT, value len %d, value :", param->write.len); @@ -425,9 +425,9 @@ static void gatts_profile_a_event_handler(esp_gatts_cb_event_t event, esp_gatt_i } } -#endif /* #if (CONFIG_GATTS_NOTIFY_THROUGHPUT) */ +#endif /* #if (CONFIG_EXAMPLE_GATTS_NOTIFY_THROUGHPUT) */ example_write_event_env(gatts_if, &a_prepare_write_env, param); -#if (CONFIG_GATTC_WRITE_THROUGHPUT) +#if (CONFIG_EXAMPLE_GATTC_WRITE_THROUGHPUT) if (param->write.handle == gl_profile_tab[PROFILE_A_APP_ID].char_handle) { // The last value byte is the checksum data, should used to check the data is received corrected or not. if (param->write.value[param->write.len - 1] == @@ -441,13 +441,13 @@ static void gatts_profile_a_event_handler(esp_gatts_cb_event_t event, esp_gatt_i break; } } -#endif /* #if (CONFIG_GATTC_WRITE_THROUGHPUT) */ +#endif /* #if (CONFIG_EXAMPLE_GATTC_WRITE_THROUGHPUT) */ break; } case ESP_GATTS_EXEC_WRITE_EVT: ESP_LOGI(GATTS_TAG,"ESP_GATTS_EXEC_WRITE_EVT"); -#if (CONFIG_GATTC_WRITE_THROUGHPUT) +#if (CONFIG_EXAMPLE_GATTC_WRITE_THROUGHPUT) if (param->exec_write.exec_write_flag == ESP_GATT_PREP_WRITE_CANCEL) { if (write_len > a_prepare_write_env.prepare_len) { write_len -= a_prepare_write_env.prepare_len; @@ -455,7 +455,7 @@ static void gatts_profile_a_event_handler(esp_gatts_cb_event_t event, esp_gatt_i write_len = 0; } } -#endif /* #if (CONFIG_GATTC_WRITE_THROUGHPUT) */ +#endif /* #if (CONFIG_EXAMPLE_GATTC_WRITE_THROUGHPUT) */ esp_ble_gatts_send_response(gatts_if, param->write.conn_id, param->write.trans_id, ESP_GATT_OK, NULL); example_exec_write_event_env(&a_prepare_write_env, param); break; @@ -546,11 +546,11 @@ static void gatts_profile_a_event_handler(esp_gatts_cb_event_t event, esp_gatt_i break; case ESP_GATTS_CONF_EVT: ESP_LOGI(GATTS_TAG, "ESP_GATTS_CONF_EVT, status %d", param->conf.status); -#if (CONFIG_GATTC_WRITE_THROUGHPUT) +#if (CONFIG_EXAMPLE_GATTC_WRITE_THROUGHPUT) start_time = false; current_time = 0; write_len = 0; -#endif /* #if (CONFIG_GATTC_WRITE_THROUGHPUT) */ +#endif /* #if (CONFIG_EXAMPLE_GATTC_WRITE_THROUGHPUT) */ break; case ESP_GATTS_OPEN_EVT: case ESP_GATTS_CANCEL_OPEN_EVT: @@ -558,14 +558,14 @@ static void gatts_profile_a_event_handler(esp_gatts_cb_event_t event, esp_gatt_i case ESP_GATTS_LISTEN_EVT: break; case ESP_GATTS_CONGEST_EVT: -#if (CONFIG_GATTS_NOTIFY_THROUGHPUT) +#if (CONFIG_EXAMPLE_GATTS_NOTIFY_THROUGHPUT) if (param->congest.congested) { can_send_notify = false; } else { can_send_notify = true; xSemaphoreGive(gatts_semaphore); } -#endif /* #if (CONFIG_GATTS_NOTIFY_THROUGHPUT) */ +#endif /* #if (CONFIG_EXAMPLE_GATTS_NOTIFY_THROUGHPUT) */ break; default: break; @@ -604,14 +604,14 @@ static void gatts_event_handler(esp_gatts_cb_event_t event, esp_gatt_if_t gatts_ void throughput_server_task(void *param) { vTaskDelay(2000 / portTICK_PERIOD_MS); -#if (CONFIG_GATTS_NOTIFY_THROUGHPUT) +#if (CONFIG_EXAMPLE_GATTS_NOTIFY_THROUGHPUT) uint8_t sum = check_sum(indicate_data, sizeof(indicate_data) - 1); // Added the check sum in the last data value. indicate_data[GATTS_NOTIFY_LEN - 1] = sum; -#endif /* #if (CONFIG_GATTS_NOTIFY_THROUGHPUT) */ +#endif /* #if (CONFIG_EXAMPLE_GATTS_NOTIFY_THROUGHPUT) */ while(1) { -#if (CONFIG_GATTS_NOTIFY_THROUGHPUT) +#if (CONFIG_EXAMPLE_GATTS_NOTIFY_THROUGHPUT) if (!can_send_notify) { int res = xSemaphoreTake(gatts_semaphore, portMAX_DELAY); assert(res == pdTRUE); @@ -622,9 +622,9 @@ void throughput_server_task(void *param) sizeof(indicate_data), indicate_data, false); } } -#endif /* #if (CONFIG_GATTS_NOTIFY_THROUGHPUT) */ +#endif /* #if (CONFIG_EXAMPLE_GATTS_NOTIFY_THROUGHPUT) */ -#if (CONFIG_GATTC_WRITE_THROUGHPUT) +#if (CONFIG_EXAMPLE_GATTC_WRITE_THROUGHPUT) uint32_t bit_rate = 0; vTaskDelay(2000 / portTICK_PERIOD_MS); if (start_time) { @@ -635,7 +635,7 @@ void throughput_server_task(void *param) } else { ESP_LOGI(GATTS_TAG, "GATTC write Bit rate = 0 Btye/s, = 0 bit/s"); } -#endif /* #if (CONFIG_GATTC_WRITE_THROUGHPUT) */ +#endif /* #if (CONFIG_EXAMPLE_GATTC_WRITE_THROUGHPUT) */ } } @@ -699,12 +699,12 @@ void app_main() } xTaskCreate(&throughput_server_task, "throughput_server_task", 4048, NULL, 15, NULL); -#if (CONFIG_GATTS_NOTIFY_THROUGHPUT) +#if (CONFIG_EXAMPLE_GATTS_NOTIFY_THROUGHPUT) gatts_semaphore = xSemaphoreCreateMutex(); if (!gatts_semaphore) { ESP_LOGE(GATTS_TAG, "%s, init fail, the gatts semaphore create fail.", __func__); return; } -#endif /* #if (CONFIG_GATTS_NOTIFY_THROUGHPUT) */ +#endif /* #if (CONFIG_EXAMPLE_GATTS_NOTIFY_THROUGHPUT) */ return; } diff --git a/examples/bluetooth/ble_throughput/throughput_server/sdkconfig.defaults b/examples/bluetooth/ble_throughput/throughput_server/sdkconfig.defaults index 5d486b83fa..b007cab140 100644 --- a/examples/bluetooth/ble_throughput/throughput_server/sdkconfig.defaults +++ b/examples/bluetooth/ble_throughput/throughput_server/sdkconfig.defaults @@ -5,7 +5,7 @@ CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY= CONFIG_BTDM_CTRL_MODE_BTDM= CONFIG_BTDM_CTRL_BLE_MAX_CONN=9 -CONFIG_GATTS_NOTIFY_THROUGHPUT=y +CONFIG_EXAMPLE_GATTS_NOTIFY_THROUGHPUT=y CONFIG_BTDM_MODEM_SLEEP=n CONFIG_BTDM_CTRL_PINNED_TO_CORE_1=y CONFIG_BTDM_CTRL_PINNED_TO_CORE=1 diff --git a/examples/common_components/protocol_examples_common/Kconfig.projbuild b/examples/common_components/protocol_examples_common/Kconfig.projbuild index fe095582b9..4a370b5634 100644 --- a/examples/common_components/protocol_examples_common/Kconfig.projbuild +++ b/examples/common_components/protocol_examples_common/Kconfig.projbuild @@ -31,25 +31,25 @@ menu "Example Connection Configuration" Can be left blank if the network has no security set. - choice PHY_MODEL + choice EXAMPLE_PHY_MODEL prompt "Ethernet PHY" depends on EXAMPLE_CONNECT_ETHERNET - default CONFIG_PHY_TLK110 + default EXAMPLE_PHY_TLK110 help Select the PHY driver to use for the example. - config PHY_IP101 + config EXAMPLE_PHY_IP101 bool "IP101" help IP101 is a single port 10/100 MII/RMII/TP/Fiber Fast Ethernet Transceiver. Goto http://www.icplus.com.tw/pp-IP101G.html for more information about it. - config PHY_TLK110 + config EXAMPLE_PHY_TLK110 bool "TI TLK110 PHY" help Select this to use the TI TLK110 PHY - config PHY_LAN8720 + config EXAMPLE_PHY_LAN8720 bool "Microchip LAN8720 PHY" help Select this to use the Microchip LAN8720 PHY @@ -57,7 +57,7 @@ menu "Example Connection Configuration" endchoice - config PHY_ADDRESS + config EXAMPLE_PHY_ADDRESS int "PHY Address (0-31)" depends on EXAMPLE_CONNECT_ETHERNET default 31 @@ -68,32 +68,32 @@ menu "Example Connection Configuration" LAN8720 default 1 or 0 - choice PHY_CLOCK_MODE + choice EXAMPLE_PHY_CLOCK_MODE prompt "EMAC clock mode" depends on EXAMPLE_CONNECT_ETHERNET - default PHY_CLOCK_GPIO0_IN + default EXAMPLE_PHY_CLOCK_GPIO0_IN help Select external (input on GPIO0) or internal (output on GPIO16 or GPIO17) clock - config PHY_CLOCK_GPIO0_IN + config EXAMPLE_PHY_CLOCK_GPIO0_IN bool "GPIO0 input" depends on EXAMPLE_CONNECT_ETHERNET help Input of 50MHz PHY clock on GPIO0. - config PHY_CLOCK_GPIO0_OUT + config EXAMPLE_PHY_CLOCK_GPIO0_OUT bool "GPIO0 Output" help Output the internal 50MHz RMII clock on GPIO0. - config PHY_CLOCK_GPIO16_OUT + config EXAMPLE_PHY_CLOCK_GPIO16_OUT bool "GPIO16 output" depends on EXAMPLE_CONNECT_ETHERNET help Output the internal 50MHz APLL clock on GPIO16. - config PHY_CLOCK_GPIO17_OUT + config EXAMPLE_PHY_CLOCK_GPIO17_OUT bool "GPIO17 output (inverted)" depends on EXAMPLE_CONNECT_ETHERNET help @@ -101,16 +101,16 @@ menu "Example Connection Configuration" endchoice - config PHY_CLOCK_MODE + config EXAMPLE_PHY_CLOCK_MODE int depends on EXAMPLE_CONNECT_ETHERNET - default 0 if PHY_CLOCK_GPIO0_IN - default 1 if PHY_CLOCK_GPIO0_OUT - default 2 if PHY_CLOCK_GPIO16_OUT - default 3 if PHY_CLOCK_GPIO17_OUT + default 0 if EXAMPLE_PHY_CLOCK_GPIO0_IN + default 1 if EXAMPLE_PHY_CLOCK_GPIO0_OUT + default 2 if EXAMPLE_PHY_CLOCK_GPIO16_OUT + default 3 if EXAMPLE_PHY_CLOCK_GPIO17_OUT - config PHY_USE_POWER_PIN + config EXAMPLE_PHY_USE_POWER_PIN bool "Use PHY Power (enable/disable) pin" depends on EXAMPLE_CONNECT_ETHERNET default y @@ -118,16 +118,16 @@ menu "Example Connection Configuration" Use a GPIO "power pin" to power the PHY on/off during operation. Consult the example README for more details - config PHY_POWER_PIN + config EXAMPLE_PHY_POWER_PIN int "PHY Power GPIO" depends on EXAMPLE_CONNECT_ETHERNET default 17 range 0 33 - depends on PHY_USE_POWER_PIN + depends on EXAMPLE_PHY_USE_POWER_PIN help GPIO number to use for powering on/off the PHY. - config PHY_SMI_MDC_PIN + config EXAMPLE_PHY_SMI_MDC_PIN int "SMI MDC Pin" depends on EXAMPLE_CONNECT_ETHERNET default 23 @@ -135,7 +135,7 @@ menu "Example Connection Configuration" help GPIO number to use for SMI clock output MDC to PHY. - config PHY_SMI_MDIO_PIN + config EXAMPLE_PHY_SMI_MDIO_PIN int "SMI MDIO Pin" depends on EXAMPLE_CONNECT_ETHERNET default 18 diff --git a/examples/common_components/protocol_examples_common/connect.c b/examples/common_components/protocol_examples_common/connect.c index 37d9df6dbe..718d498f71 100644 --- a/examples/common_components/protocol_examples_common/connect.c +++ b/examples/common_components/protocol_examples_common/connect.c @@ -160,23 +160,23 @@ static void stop() #include "driver/gpio.h" -#ifdef CONFIG_PHY_LAN8720 +#ifdef CONFIG_EXAMPLE_PHY_LAN8720 #include "eth_phy/phy_lan8720.h" #define DEFAULT_ETHERNET_PHY_CONFIG phy_lan8720_default_ethernet_config #endif -#ifdef CONFIG_PHY_TLK110 +#ifdef CONFIG_EXAMPLE_PHY_TLK110 #include "eth_phy/phy_tlk110.h" #define DEFAULT_ETHERNET_PHY_CONFIG phy_tlk110_default_ethernet_config -#elif CONFIG_PHY_IP101 +#elif CONFIG_EXAMPLE_PHY_IP101 #include "eth_phy/phy_ip101.h" #define DEFAULT_ETHERNET_PHY_CONFIG phy_ip101_default_ethernet_config #endif -#define PIN_PHY_POWER CONFIG_PHY_POWER_PIN -#define PIN_SMI_MDC CONFIG_PHY_SMI_MDC_PIN -#define PIN_SMI_MDIO CONFIG_PHY_SMI_MDIO_PIN +#define PIN_PHY_POWER CONFIG_EXAMPLE_PHY_POWER_PIN +#define PIN_SMI_MDC CONFIG_EXAMPLE_PHY_SMI_MDC_PIN +#define PIN_SMI_MDIO CONFIG_EXAMPLE_PHY_SMI_MDIO_PIN -#ifdef CONFIG_PHY_USE_POWER_PIN +#ifdef CONFIG_EXAMPLE_PHY_USE_POWER_PIN /** * @brief re-define power enable func for phy * @@ -252,12 +252,12 @@ static void on_eth_event(void* arg, esp_event_base_t event_base, static void start() { eth_config_t config = DEFAULT_ETHERNET_PHY_CONFIG; - config.phy_addr = CONFIG_PHY_ADDRESS; + config.phy_addr = CONFIG_EXAMPLE_PHY_ADDRESS; config.gpio_config = eth_gpio_config_rmii; config.tcpip_input = tcpip_adapter_eth_input; - config.clock_mode = CONFIG_PHY_CLOCK_MODE; + config.clock_mode = CONFIG_EXAMPLE_PHY_CLOCK_MODE; -#ifdef CONFIG_PHY_USE_POWER_PIN +#ifdef CONFIG_EXAMPLE_PHY_USE_POWER_PIN /* Replace the default 'power enable' function with an example-specific one that toggles a power GPIO. */ config.phy_power_enable = phy_device_power_enable_via_gpio; diff --git a/examples/peripherals/adc2/main/Kconfig.projbuild b/examples/peripherals/adc2/main/Kconfig.projbuild index d122b6f4e9..35b19fff7a 100644 --- a/examples/peripherals/adc2/main/Kconfig.projbuild +++ b/examples/peripherals/adc2/main/Kconfig.projbuild @@ -1,61 +1,61 @@ menu "Example Configuration" - choice ADC2_EXAMPLE_CHANNEL + choice EXAMPLE_ADC2_CHANNEL bool "ADC2 Channel Num" - default ADC2_EXAMPLE_CHANNEL_7 + default EXAMPLE_ADC2_CHANNEL_7 help The channel of ADC2 used in this example. - config ADC2_EXAMPLE_CHANNEL_0 + config EXAMPLE_ADC2_CHANNEL_0 bool "ADC2 Channel 0 (GPIO 4)" - config ADC2_EXAMPLE_CHANNEL_1 + config EXAMPLE_ADC2_CHANNEL_1 bool "ADC2 Channel 1 (GPIO 0)" - config ADC2_EXAMPLE_CHANNEL_2 + config EXAMPLE_ADC2_CHANNEL_2 bool "ADC2 Channel 2 (GPIO 2)" - config ADC2_EXAMPLE_CHANNEL_3 + config EXAMPLE_ADC2_CHANNEL_3 bool "ADC2 Channel 3 (GPIO 15)" - config ADC2_EXAMPLE_CHANNEL_4 + config EXAMPLE_ADC2_CHANNEL_4 bool "ADC2 Channel 4 (GPIO 13)" - config ADC2_EXAMPLE_CHANNEL_5 + config EXAMPLE_ADC2_CHANNEL_5 bool "ADC2 Channel 5 (GPIO 12)" - config ADC2_EXAMPLE_CHANNEL_6 + config EXAMPLE_ADC2_CHANNEL_6 bool "ADC2 Channel 6 (GPIO 14)" - config ADC2_EXAMPLE_CHANNEL_7 + config EXAMPLE_ADC2_CHANNEL_7 bool "ADC2 Channel 7 (GPIO 27)" - config ADC2_EXAMPLE_CHANNEL_8 + config EXAMPLE_ADC2_CHANNEL_8 bool "ADC2 Channel 8 (GPIO 25)" - config ADC2_EXAMPLE_CHANNEL_9 + config EXAMPLE_ADC2_CHANNEL_9 bool "ADC2 Channel 9 (GPIO 26)" endchoice - config ADC2_EXAMPLE_CHANNEL + config EXAMPLE_ADC2_CHANNEL int - default 0 if ADC2_EXAMPLE_CHANNEL_0 - default 1 if ADC2_EXAMPLE_CHANNEL_1 - default 2 if ADC2_EXAMPLE_CHANNEL_2 - default 3 if ADC2_EXAMPLE_CHANNEL_3 - default 4 if ADC2_EXAMPLE_CHANNEL_4 - default 5 if ADC2_EXAMPLE_CHANNEL_5 - default 6 if ADC2_EXAMPLE_CHANNEL_6 - default 7 if ADC2_EXAMPLE_CHANNEL_7 - default 8 if ADC2_EXAMPLE_CHANNEL_8 - default 9 if ADC2_EXAMPLE_CHANNEL_9 + default 0 if EXAMPLE_ADC2_CHANNEL_0 + default 1 if EXAMPLE_ADC2_CHANNEL_1 + default 2 if EXAMPLE_ADC2_CHANNEL_2 + default 3 if EXAMPLE_ADC2_CHANNEL_3 + default 4 if EXAMPLE_ADC2_CHANNEL_4 + default 5 if EXAMPLE_ADC2_CHANNEL_5 + default 6 if EXAMPLE_ADC2_CHANNEL_6 + default 7 if EXAMPLE_ADC2_CHANNEL_7 + default 8 if EXAMPLE_ADC2_CHANNEL_8 + default 9 if EXAMPLE_ADC2_CHANNEL_9 - choice DAC_EXAMPLE_CHANNEL + choice EXAMPLE_DAC_CHANNEL bool "DAC Channel Num" - default DAC_EXAMPLE_CHANNEL_1 + default EXAMPLE_DAC_CHANNEL_1 help The channel of DAC used in this example. - config DAC_EXAMPLE_CHANNEL_1 + config EXAMPLE_DAC_CHANNEL_1 bool "DAC Channel 1 (GPIO25)" - config DAC_EXAMPLE_CHANNEL_2 + config EXAMPLE_DAC_CHANNEL_2 bool "DAC Channel 2 (GPIO26)" endchoice - config DAC_EXAMPLE_CHANNEL + config EXAMPLE_DAC_CHANNEL int - default 1 if DAC_EXAMPLE_CHANNEL_1 - default 2 if DAC_EXAMPLE_CHANNEL_2 + default 1 if EXAMPLE_DAC_CHANNEL_1 + default 2 if EXAMPLE_DAC_CHANNEL_2 endmenu diff --git a/examples/peripherals/adc2/main/adc2_example_main.c b/examples/peripherals/adc2/main/adc2_example_main.c index 3542dad8d9..ccf32b3d5f 100644 --- a/examples/peripherals/adc2/main/adc2_example_main.c +++ b/examples/peripherals/adc2/main/adc2_example_main.c @@ -17,8 +17,8 @@ #include "esp_system.h" #include "esp_adc_cal.h" -#define DAC_EXAMPLE_CHANNEL CONFIG_DAC_EXAMPLE_CHANNEL -#define ADC2_EXAMPLE_CHANNEL CONFIG_ADC2_EXAMPLE_CHANNEL +#define DAC_EXAMPLE_CHANNEL CONFIG_EXAMPLE_DAC_CHANNEL +#define ADC2_EXAMPLE_CHANNEL CONFIG_EXAMPLE_ADC2_CHANNEL void app_main(void) { diff --git a/examples/peripherals/i2c/i2c_tools/main/Kconfig.projbuild b/examples/peripherals/i2c/i2c_tools/main/Kconfig.projbuild index 52a6926f9e..fab9d89fc9 100644 --- a/examples/peripherals/i2c/i2c_tools/main/Kconfig.projbuild +++ b/examples/peripherals/i2c/i2c_tools/main/Kconfig.projbuild @@ -1,6 +1,6 @@ menu "Example Configuration" - config STORE_HISTORY + config EXAMPLE_STORE_HISTORY bool "Store command history in flash" default y help @@ -8,14 +8,14 @@ menu "Example Configuration" command history. If this option is enabled, initalizes a FAT filesystem and uses it to store command history. - config MAX_CMD_ARGUMENTS + config EXAMPLE_MAX_CMD_ARGUMENTS int "Maximum number of command line arguments" default 16 range 8 256 help maximum number of command line arguments to parse - config MAX_CMD_LENGTH + config EXAMPLE_MAX_CMD_LENGTH int "Command line buffer length" default 256 range 256 512 diff --git a/examples/peripherals/i2c/i2c_tools/main/i2ctools_example_main.c b/examples/peripherals/i2c/i2c_tools/main/i2ctools_example_main.c index c91803cd8d..ea79a854db 100644 --- a/examples/peripherals/i2c/i2c_tools/main/i2ctools_example_main.c +++ b/examples/peripherals/i2c/i2c_tools/main/i2ctools_example_main.c @@ -24,7 +24,7 @@ static const char *TAG = "i2c-tools"; -#if CONFIG_STORE_HISTORY +#if CONFIG_EXAMPLE_STORE_HISTORY #define MOUNT_PATH "/data" #define HISTORY_PATH MOUNT_PATH "/history.txt" @@ -42,7 +42,7 @@ static void initialize_filesystem() return; } } -#endif // CONFIG_STORE_HISTORY +#endif // CONFIG_EXAMPLE_STORE_HISTORY static void initialize_nvs() { @@ -85,8 +85,8 @@ static void initialize_console() /* Initialize the console */ esp_console_config_t console_config = { - .max_cmdline_args = CONFIG_MAX_CMD_ARGUMENTS, - .max_cmdline_length = CONFIG_MAX_CMD_LENGTH, + .max_cmdline_args = CONFIG_EXAMPLE_MAX_CMD_ARGUMENTS, + .max_cmdline_length = CONFIG_EXAMPLE_MAX_CMD_LENGTH, #if CONFIG_LOG_COLORS .hint_color = atoi(LOG_COLOR_CYAN) #endif @@ -103,7 +103,7 @@ static void initialize_console() /* Set command history size */ linenoiseHistorySetMaxLen(100); -#if CONFIG_STORE_HISTORY +#if CONFIG_EXAMPLE_STORE_HISTORY /* Load command history from filesystem */ linenoiseHistoryLoad(HISTORY_PATH); #endif @@ -113,7 +113,7 @@ void app_main() { initialize_nvs(); -#if CONFIG_STORE_HISTORY +#if CONFIG_EXAMPLE_STORE_HISTORY initialize_filesystem(); #endif @@ -170,7 +170,7 @@ void app_main() } /* Add the command to the history */ linenoiseHistoryAdd(line); -#if CONFIG_STORE_HISTORY +#if CONFIG_EXAMPLE_STORE_HISTORY /* Save command history to filesystem */ linenoiseHistorySave(HISTORY_PATH); #endif diff --git a/examples/peripherals/sdio/host/main/Kconfig.projbuild b/examples/peripherals/sdio/host/main/Kconfig.projbuild index 586117ff10..7fb21ebd19 100644 --- a/examples/peripherals/sdio/host/main/Kconfig.projbuild +++ b/examples/peripherals/sdio/host/main/Kconfig.projbuild @@ -1,16 +1,16 @@ menu "Example Configuration" - config SDIO_EXAMPLE_OVER_SPI + config EXAMPLE_SDIO_OVER_SPI bool "Host use SPI bus to communicate with slave" default n help If this is set, the host tries using SPI bus to communicate with slave. Otherwise, the standarad SD bus is used. - config SDIO_EXAMPLE_4BIT + config EXAMPLE_SDIO_4BIT bool "Host tries using 4-bit mode to communicate with slave" default n - depends on !SDIO_EXAMPLE_OVER_SPI + depends on !EXAMPLE_SDIO_OVER_SPI help If this is set, the host tries using 4-bit mode to communicate with slave. If failed, the communication falls back to 1-bit mode. @@ -21,7 +21,7 @@ menu "Example Configuration" Note that 4-bit mode is not compatible (by default) if the slave is using 3.3V flash which requires a pull-down on the MTDI pin. - config SDIO_EXAMPLE_HIGHSPEED + config EXAMPLE_SDIO_HIGHSPEED bool "Host tries using HS mode to communicate with slave" default y help diff --git a/examples/peripherals/sdio/host/main/app_main.c b/examples/peripherals/sdio/host/main/app_main.c index cc4b1dcd9a..23245a3fc7 100644 --- a/examples/peripherals/sdio/host/main/app_main.c +++ b/examples/peripherals/sdio/host/main/app_main.c @@ -121,7 +121,7 @@ esp_err_t slave_reset(esp_slave_context_t *context) return ret; } -#ifdef CONFIG_SDIO_EXAMPLE_OVER_SPI +#ifdef CONFIG_EXAMPLE_SDIO_OVER_SPI static void gpio_d2_set_high() { gpio_config_t d2_config = { @@ -139,9 +139,9 @@ esp_err_t slave_init(esp_slave_context_t *context) { esp_err_t err; /* Probe */ -#ifndef CONFIG_SDIO_EXAMPLE_OVER_SPI +#ifndef CONFIG_EXAMPLE_SDIO_OVER_SPI sdmmc_host_t config = SDMMC_HOST_DEFAULT(); -#ifdef CONFIG_SDIO_EXAMPLE_4BIT +#ifdef CONFIG_EXAMPLE_SDIO_4BIT ESP_LOGI(TAG, "Probe using SD 4-bit...\n"); config.flags = SDMMC_HOST_FLAG_4BIT; #else @@ -149,7 +149,7 @@ esp_err_t slave_init(esp_slave_context_t *context) config.flags = SDMMC_HOST_FLAG_1BIT; #endif -#ifdef CONFIG_SDIO_EXAMPLE_HIGHSPEED +#ifdef CONFIG_EXAMPLE_SDIO_HIGHSPEED config.max_freq_khz = SDMMC_FREQ_HIGHSPEED; #else config.max_freq_khz = SDMMC_FREQ_DEFAULT; diff --git a/examples/protocols/http_server/restful_server/Makefile b/examples/protocols/http_server/restful_server/Makefile index 6870cd55f6..c07edffd2a 100644 --- a/examples/protocols/http_server/restful_server/Makefile +++ b/examples/protocols/http_server/restful_server/Makefile @@ -4,7 +4,7 @@ EXTRA_COMPONENT_DIRS = $(IDF_PATH)/examples/common_components/protocol_examples_ include $(IDF_PATH)/make/project.mk -ifdef CONFIG_WEB_DEPLOY_SF +ifdef CONFIG_EXAMPLE_WEB_DEPLOY_SF WEB_SRC_DIR = $(shell pwd)/front/web-demo ifneq ($(wildcard $(WEB_SRC_DIR)/dist/.*),) $(eval $(call spiffs_create_partition_image,www,$(WEB_SRC_DIR)/dist,FLASH_IN_PROJECT)) diff --git a/examples/protocols/http_server/restful_server/main/CMakeLists.txt b/examples/protocols/http_server/restful_server/main/CMakeLists.txt index e0a89216f0..6df9c7c4da 100644 --- a/examples/protocols/http_server/restful_server/main/CMakeLists.txt +++ b/examples/protocols/http_server/restful_server/main/CMakeLists.txt @@ -3,7 +3,7 @@ set(COMPONENT_ADD_INCLUDEDIRS ".") register_component() -if(CONFIG_WEB_DEPLOY_SF) +if(CONFIG_EXAMPLE_WEB_DEPLOY_SF) set(WEB_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../front/web-demo") if(EXISTS ${WEB_SRC_DIR}/dist) spiffs_create_partition_image(www ${WEB_SRC_DIR}/dist FLASH_IN_PROJECT) diff --git a/examples/protocols/http_server/restful_server/main/Kconfig.projbuild b/examples/protocols/http_server/restful_server/main/Kconfig.projbuild index 5ae5a36e6f..ae0827734c 100644 --- a/examples/protocols/http_server/restful_server/main/Kconfig.projbuild +++ b/examples/protocols/http_server/restful_server/main/Kconfig.projbuild @@ -1,39 +1,39 @@ menu "Example Configuration" - config MDNS_HOST_NAME + config EXAMPLE_MDNS_HOST_NAME string "mDNS Host Name" default "esp-home" help Specify the domain name used in the mDNS service. Note that webpage also take it as a part of URL where it will send GET/POST requests to. - choice WEB_DEPLOY_MODE + choice EXAMPLE_WEB_DEPLOY_MODE prompt "Website deploy mode" - default WEB_DEPLOY_SEMIHOST + default EXAMPLE_WEB_DEPLOY_SEMIHOST help Select website deploy mode. You can deploy website to host, and ESP32 will retrieve them in a semihost way (JTAG is needed). You can deploy website to SD card or SPI flash, and ESP32 will retrieve them via SDIO/SPI interface. Detailed operation steps are listed in the example README file. - config WEB_DEPLOY_SEMIHOST + config EXAMPLE_WEB_DEPLOY_SEMIHOST bool "Deploy website to host (JTAG is needed)" help Deploy website to host. It is recommended to choose this mode during developing. - config WEB_DEPLOY_SD + config EXAMPLE_WEB_DEPLOY_SD bool "Deploy website to SD card" help Deploy website to SD card. Choose this production mode if the size of website is too large (bigger than 2MB). - config WEB_DEPLOY_SF + config EXAMPLE_WEB_DEPLOY_SF bool "Deploy website to SPI Nor Flash" help Deploy website to SPI Nor Flash. Choose this production mode if the size of website is small (less than 2MB). endchoice - if WEB_DEPLOY_SEMIHOST - config HOST_PATH_TO_MOUNT + if EXAMPLE_WEB_DEPLOY_SEMIHOST + config EXAMPLE_HOST_PATH_TO_MOUNT string "Host path to mount (e.g. absolute path to web dist directory)" default "PATH-TO-WEB-DIST_DIR" help @@ -41,7 +41,7 @@ menu "Example Configuration" Note that only absolute path is acceptable. endif - config WEB_MOUNT_POINT + config EXAMPLE_WEB_MOUNT_POINT string "Website mount point in VFS" default "/www" help diff --git a/examples/protocols/http_server/restful_server/main/esp_rest_main.c b/examples/protocols/http_server/restful_server/main/esp_rest_main.c index 7785a0a41c..dc885fa5b2 100644 --- a/examples/protocols/http_server/restful_server/main/esp_rest_main.c +++ b/examples/protocols/http_server/restful_server/main/esp_rest_main.c @@ -30,7 +30,7 @@ esp_err_t start_rest_server(const char *base_path); static void initialise_mdns(void) { mdns_init(); - mdns_hostname_set(CONFIG_MDNS_HOST_NAME); + mdns_hostname_set(CONFIG_EXAMPLE_MDNS_HOST_NAME); mdns_instance_name_set(MDNS_INSTANCE); mdns_txt_item_t serviceTxtData[] = { @@ -42,10 +42,10 @@ static void initialise_mdns(void) sizeof(serviceTxtData) / sizeof(serviceTxtData[0]))); } -#if CONFIG_WEB_DEPLOY_SEMIHOST +#if CONFIG_EXAMPLE_WEB_DEPLOY_SEMIHOST esp_err_t init_fs(void) { - esp_err_t ret = esp_vfs_semihost_register(CONFIG_WEB_MOUNT_POINT, CONFIG_HOST_PATH_TO_MOUNT); + esp_err_t ret = esp_vfs_semihost_register(CONFIG_EXAMPLE_WEB_MOUNT_POINT, CONFIG_EXAMPLE_HOST_PATH_TO_MOUNT); if (ret != ESP_OK) { ESP_LOGE(TAG, "Failed to register semihost driver (%s)!", esp_err_to_name(ret)); return ESP_FAIL; @@ -54,7 +54,7 @@ esp_err_t init_fs(void) } #endif -#if CONFIG_WEB_DEPLOY_SD +#if CONFIG_EXAMPLE_WEB_DEPLOY_SD esp_err_t init_fs(void) { sdmmc_host_t host = SDMMC_HOST_DEFAULT(); @@ -73,7 +73,7 @@ esp_err_t init_fs(void) }; sdmmc_card_t *card; - esp_err_t ret = esp_vfs_fat_sdmmc_mount(CONFIG_WEB_MOUNT_POINT, &host, &slot_config, &mount_config, &card); + esp_err_t ret = esp_vfs_fat_sdmmc_mount(CONFIG_EXAMPLE_WEB_MOUNT_POINT, &host, &slot_config, &mount_config, &card); if (ret != ESP_OK) { if (ret == ESP_FAIL) { ESP_LOGE(TAG, "Failed to mount filesystem."); @@ -88,11 +88,11 @@ esp_err_t init_fs(void) } #endif -#if CONFIG_WEB_DEPLOY_SF +#if CONFIG_EXAMPLE_WEB_DEPLOY_SF esp_err_t init_fs(void) { esp_vfs_spiffs_conf_t conf = { - .base_path = CONFIG_WEB_MOUNT_POINT, + .base_path = CONFIG_EXAMPLE_WEB_MOUNT_POINT, .partition_label = NULL, .max_files = 5, .format_if_mount_failed = false @@ -130,5 +130,5 @@ void app_main() ESP_ERROR_CHECK(example_connect()); ESP_ERROR_CHECK(init_fs()); - ESP_ERROR_CHECK(start_rest_server(CONFIG_WEB_MOUNT_POINT)); + ESP_ERROR_CHECK(start_rest_server(CONFIG_EXAMPLE_WEB_MOUNT_POINT)); } diff --git a/examples/protocols/mdns/README.md b/examples/protocols/mdns/README.md index 182434e58c..2c35167647 100644 --- a/examples/protocols/mdns/README.md +++ b/examples/protocols/mdns/README.md @@ -31,7 +31,7 @@ make -j4 flash monitor - You can now ping the device at `[board-hostname].local`, where `[board-hostname]` is preconfigured hostname, `esp32-mdns` by default. - You can also browse for `_http._tcp` on the same network to find the advertised service - Pressing the BOOT button will start querying the local network for the predefined in `check_button` hosts and services -- Note that for purpose of CI tests, configuration options of `RESOLVE_TEST_SERVICES` and `MDNS_ADD_MAC_TO_HOSTNAME` are available, but disabled by default. If enabled, then the hostname suffix of last 3 bytes from device MAC address is added, e.g. `esp32-mdns-80FFFF`, and a query for test service is issued. +- Note that for purpose of CI tests, configuration options of `MDNS_RESOLVE_TEST_SERVICES` and `MDNS_ADD_MAC_TO_HOSTNAME` are available, but disabled by default. If enabled, then the hostname suffix of last 3 bytes from device MAC address is added, e.g. `esp32-mdns-80FFFF`, and a query for test service is issued. (To exit the serial monitor, type ``Ctrl-]``.) diff --git a/examples/protocols/mdns/main/Kconfig.projbuild b/examples/protocols/mdns/main/Kconfig.projbuild index 7e7b22640c..c4ae7e13b4 100644 --- a/examples/protocols/mdns/main/Kconfig.projbuild +++ b/examples/protocols/mdns/main/Kconfig.projbuild @@ -12,7 +12,7 @@ menu "Example Configuration" help mDNS Instance Name for example to use - config RESOLVE_TEST_SERVICES + config MDNS_RESOLVE_TEST_SERVICES bool "Resolve test services" default n help diff --git a/examples/protocols/mdns/main/mdns_example_main.c b/examples/protocols/mdns/main/mdns_example_main.c index 1004475f39..11bee313b0 100644 --- a/examples/protocols/mdns/main/mdns_example_main.c +++ b/examples/protocols/mdns/main/mdns_example_main.c @@ -165,7 +165,7 @@ static void check_button(void) static void mdns_example_task(void *pvParameters) { -#if CONFIG_RESOLVE_TEST_SERVICES == 1 +#if CONFIG_MDNS_RESOLVE_TEST_SERVICES == 1 /* Send initial queries that are started by CI tester */ query_mdns_host("tinytester"); #endif diff --git a/examples/protocols/mdns/sdkconfig.ci b/examples/protocols/mdns/sdkconfig.ci index 8d9206d0e5..13b56273e1 100644 --- a/examples/protocols/mdns/sdkconfig.ci +++ b/examples/protocols/mdns/sdkconfig.ci @@ -1,2 +1,2 @@ -CONFIG_RESOLVE_TEST_SERVICES=y +CONFIG_MDNS_RESOLVE_TEST_SERVICES=y CONFIG_MDNS_ADD_MAC_TO_HOSTNAME=y diff --git a/examples/protocols/mqtt/publish_test/main/Kconfig.projbuild b/examples/protocols/mqtt/publish_test/main/Kconfig.projbuild index 66d3cb09e3..8360e573d2 100644 --- a/examples/protocols/mqtt/publish_test/main/Kconfig.projbuild +++ b/examples/protocols/mqtt/publish_test/main/Kconfig.projbuild @@ -1,50 +1,50 @@ menu "Example Configuration" - config BROKER_SSL_URI + config EXAMPLE_BROKER_SSL_URI string "Broker SSL URL" default "mqtts://iot.eclipse.org:8883" help URL of an mqtt broker for ssl transport - config BROKER_TCP_URI + config EXAMPLE_BROKER_TCP_URI string "Broker TCP URL" default "mqtt://iot.eclipse.org:1883" help URL of an mqtt broker for tcp transport - config BROKER_WS_URI + config EXAMPLE_BROKER_WS_URI string "Broker WS URL" default "ws://iot.eclipse.org:80/ws" help URL of an mqtt broker for ws transport - config BROKER_WSS_URI + config EXAMPLE_BROKER_WSS_URI string "Broker WSS URL" default "wss://iot.eclipse.org:443/ws" help URL of an mqtt broker for wss transport - config PUBLISH_TOPIC + config EXAMPLE_PUBLISH_TOPIC string "publish topic" default "/topic/publish/esp2py" help topic to which esp32 client publishes - config SUBSCIBE_TOPIC + config EXAMPLE_SUBSCIBE_TOPIC string "subscribe topic" default "/topic/subscribe/py2esp" help topic to which esp32 client subsribes (and expects data) - config BROKER_CERTIFICATE_OVERRIDE + config EXAMPLE_BROKER_CERTIFICATE_OVERRIDE string "Broker certificate override" default "" help Please leave empty if broker certificate included from a textfile; otherwise fill in a base64 part of PEM format certificate - config BROKER_CERTIFICATE_OVERRIDDEN + config EXAMPLE_BROKER_CERTIFICATE_OVERRIDDEN bool - default y if BROKER_CERTIFICATE_OVERRIDE != "" + default y if EXAMPLE_BROKER_CERTIFICATE_OVERRIDE != "" endmenu diff --git a/examples/protocols/mqtt/publish_test/main/publish_test.c b/examples/protocols/mqtt/publish_test/main/publish_test.c index 99ef19d747..15cd2b09bf 100644 --- a/examples/protocols/mqtt/publish_test/main/publish_test.c +++ b/examples/protocols/mqtt/publish_test/main/publish_test.c @@ -45,8 +45,8 @@ static size_t actual_published = 0; static int qos_test = 0; -#if CONFIG_BROKER_CERTIFICATE_OVERRIDDEN == 1 -static const uint8_t iot_eclipse_org_pem_start[] = "-----BEGIN CERTIFICATE-----\n" CONFIG_BROKER_CERTIFICATE_OVERRIDE "\n-----END CERTIFICATE-----"; +#if CONFIG_EXAMPLE_BROKER_CERTIFICATE_OVERRIDDEN == 1 +static const uint8_t iot_eclipse_org_pem_start[] = "-----BEGIN CERTIFICATE-----\n" CONFIG_EXAMPLE_BROKER_CERTIFICATE_OVERRIDE "\n-----END CERTIFICATE-----"; #else extern const uint8_t iot_eclipse_org_pem_start[] asm("_binary_iot_eclipse_org_pem_start"); #endif @@ -62,7 +62,7 @@ static esp_err_t mqtt_event_handler(esp_mqtt_event_handle_t event) case MQTT_EVENT_CONNECTED: ESP_LOGI(TAG, "MQTT_EVENT_CONNECTED"); xEventGroupSetBits(mqtt_event_group, CONNECTED_BIT); - msg_id = esp_mqtt_client_subscribe(client, CONFIG_SUBSCIBE_TOPIC, qos_test); + msg_id = esp_mqtt_client_subscribe(client, CONFIG_EXAMPLE_SUBSCIBE_TOPIC, qos_test); ESP_LOGI(TAG, "sent subscribe successful, msg_id=%d", msg_id); break; @@ -199,16 +199,16 @@ void app_main() if (0 == strcmp(transport, "tcp")) { ESP_LOGI(TAG, "[TCP transport] Startup.."); - esp_mqtt_client_set_uri(mqtt_client, CONFIG_BROKER_TCP_URI); + esp_mqtt_client_set_uri(mqtt_client, CONFIG_EXAMPLE_BROKER_TCP_URI); } else if (0 == strcmp(transport, "ssl")) { ESP_LOGI(TAG, "[SSL transport] Startup.."); - esp_mqtt_client_set_uri(mqtt_client, CONFIG_BROKER_SSL_URI); + esp_mqtt_client_set_uri(mqtt_client, CONFIG_EXAMPLE_BROKER_SSL_URI); } else if (0 == strcmp(transport, "ws")) { ESP_LOGI(TAG, "[WS transport] Startup.."); - esp_mqtt_client_set_uri(mqtt_client, CONFIG_BROKER_WS_URI); + esp_mqtt_client_set_uri(mqtt_client, CONFIG_EXAMPLE_BROKER_WS_URI); } else if (0 == strcmp(transport, "wss")) { ESP_LOGI(TAG, "[WSS transport] Startup.."); - esp_mqtt_client_set_uri(mqtt_client, CONFIG_BROKER_WSS_URI); + esp_mqtt_client_set_uri(mqtt_client, CONFIG_EXAMPLE_BROKER_WSS_URI); } else { ESP_LOGE(TAG, "Unexpected transport"); abort(); @@ -219,7 +219,7 @@ void app_main() xEventGroupWaitBits(mqtt_event_group, CONNECTED_BIT, false, true, portMAX_DELAY); for (int i = 0; i < expected_published; i++) { - int msg_id = esp_mqtt_client_publish(mqtt_client, CONFIG_PUBLISH_TOPIC, expected_data, expected_size, qos_test, 0); + int msg_id = esp_mqtt_client_publish(mqtt_client, CONFIG_EXAMPLE_PUBLISH_TOPIC, expected_data, expected_size, qos_test, 0); ESP_LOGI(TAG, "[%d] Publishing...", msg_id); } } diff --git a/examples/protocols/mqtt/publish_test/sdkconfig.ci b/examples/protocols/mqtt/publish_test/sdkconfig.ci index 00db776d79..4ff3a8dc62 100644 --- a/examples/protocols/mqtt/publish_test/sdkconfig.ci +++ b/examples/protocols/mqtt/publish_test/sdkconfig.ci @@ -1,5 +1,5 @@ -CONFIG_BROKER_SSL_URI="mqtts://${EXAMPLE_MQTT_BROKER_SSL}" -CONFIG_BROKER_TCP_URI="mqtt://${EXAMPLE_MQTT_BROKER_TCP}" -CONFIG_BROKER_WS_URI="ws://${EXAMPLE_MQTT_BROKER_WS}/ws" -CONFIG_BROKER_WSS_URI="wss://${EXAMPLE_MQTT_BROKER_WSS}/ws" -CONFIG_BROKER_CERTIFICATE_OVERRIDE="${EXAMPLE_MQTT_BROKER_CERTIFICATE}" +CONFIG_EXAMPLE_BROKER_SSL_URI="mqtts://${EXAMPLE_MQTT_BROKER_SSL}" +CONFIG_EXAMPLE_BROKER_TCP_URI="mqtt://${EXAMPLE_MQTT_BROKER_TCP}" +CONFIG_EXAMPLE_BROKER_WS_URI="ws://${EXAMPLE_MQTT_BROKER_WS}/ws" +CONFIG_EXAMPLE_BROKER_WSS_URI="wss://${EXAMPLE_MQTT_BROKER_WSS}/ws" +CONFIG_EXAMPLE_BROKER_CERTIFICATE_OVERRIDE="${EXAMPLE_MQTT_BROKER_CERTIFICATE}" diff --git a/examples/protocols/pppos_client/components/modem/src/esp_modem.c b/examples/protocols/pppos_client/components/modem/src/esp_modem.c index 9a6fc8ad38..148d67473c 100644 --- a/examples/protocols/pppos_client/components/modem/src/esp_modem.c +++ b/examples/protocols/pppos_client/components/modem/src/esp_modem.c @@ -25,7 +25,7 @@ #include "esp_log.h" #include "sdkconfig.h" -#define ESP_MODEM_LINE_BUFFER_SIZE (CONFIG_UART_RX_BUFFER_SIZE / 2) +#define ESP_MODEM_LINE_BUFFER_SIZE (CONFIG_EXAMPLE_UART_RX_BUFFER_SIZE / 2) #define ESP_MODEM_EVENT_QUEUE_SIZE (16) #define MIN_PATTERN_INTERVAL (10000) @@ -299,7 +299,7 @@ static esp_err_t esp_modem_dte_change_mode(modem_dte_t *dte, modem_mode_t new_mo uart_disable_rx_intr(esp_dte->uart_port); uart_flush(esp_dte->uart_port); uart_enable_pattern_det_intr(esp_dte->uart_port, '\n', 1, MIN_PATTERN_INTERVAL, MIN_POST_IDLE, MIN_PRE_IDLE); - uart_pattern_queue_reset(esp_dte->uart_port, CONFIG_UART_PATTERN_QUEUE_SIZE); + uart_pattern_queue_reset(esp_dte->uart_port, CONFIG_EXAMPLE_UART_PATTERN_QUEUE_SIZE); MODEM_CHECK(dce->set_working_mode(dce, new_mode) == ESP_OK, "set new working mode:%d failed", err, new_mode); break; default: @@ -373,10 +373,10 @@ modem_dte_t *esp_modem_dte_init(const esp_modem_dte_config_t *config) }; MODEM_CHECK(uart_param_config(esp_dte->uart_port, &uart_config) == ESP_OK, "config uart parameter failed", err_uart_config); if (config->flow_control == MODEM_FLOW_CONTROL_HW) { - res = uart_set_pin(esp_dte->uart_port, CONFIG_MODEM_TX_PIN, CONFIG_MODEM_RX_PIN, - CONFIG_MODEM_RTS_PIN, CONFIG_MODEM_CTS_PIN); + res = uart_set_pin(esp_dte->uart_port, CONFIG_EXAMPLE_UART_MODEM_TX_PIN, CONFIG_EXAMPLE_UART_MODEM_RX_PIN, + CONFIG_EXAMPLE_UART_MODEM_RTS_PIN, CONFIG_EXAMPLE_UART_MODEM_CTS_PIN); } else { - res = uart_set_pin(esp_dte->uart_port, CONFIG_MODEM_TX_PIN, CONFIG_MODEM_RX_PIN, + res = uart_set_pin(esp_dte->uart_port, CONFIG_EXAMPLE_UART_MODEM_TX_PIN, CONFIG_EXAMPLE_UART_MODEM_RX_PIN, UART_PIN_NO_CHANGE, UART_PIN_NO_CHANGE); } MODEM_CHECK(res == ESP_OK, "config uart gpio failed", err_uart_config); @@ -388,13 +388,13 @@ modem_dte_t *esp_modem_dte_init(const esp_modem_dte_config_t *config) } MODEM_CHECK(res == ESP_OK, "config uart flow control failed", err_uart_config); /* Install UART driver and get event queue used inside driver */ - res = uart_driver_install(esp_dte->uart_port, CONFIG_UART_RX_BUFFER_SIZE, CONFIG_UART_TX_BUFFER_SIZE, - CONFIG_UART_EVENT_QUEUE_SIZE, &(esp_dte->event_queue), 0); + res = uart_driver_install(esp_dte->uart_port, CONFIG_EXAMPLE_UART_RX_BUFFER_SIZE, CONFIG_EXAMPLE_UART_TX_BUFFER_SIZE, + CONFIG_EXAMPLE_UART_EVENT_QUEUE_SIZE, &(esp_dte->event_queue), 0); MODEM_CHECK(res == ESP_OK, "install uart driver failed", err_uart_config); /* Set pattern interrupt, used to detect the end of a line. */ res = uart_enable_pattern_det_intr(esp_dte->uart_port, '\n', 1, MIN_PATTERN_INTERVAL, MIN_POST_IDLE, MIN_PRE_IDLE); /* Set pattern queue size */ - res |= uart_pattern_queue_reset(esp_dte->uart_port, CONFIG_UART_PATTERN_QUEUE_SIZE); + res |= uart_pattern_queue_reset(esp_dte->uart_port, CONFIG_EXAMPLE_UART_PATTERN_QUEUE_SIZE); MODEM_CHECK(res == ESP_OK, "config uart pattern failed", err_uart_pattern); /* Create Event loop */ esp_event_loop_args_t loop_args = { @@ -408,9 +408,9 @@ modem_dte_t *esp_modem_dte_init(const esp_modem_dte_config_t *config) /* Create UART Event task */ BaseType_t ret = xTaskCreate(uart_event_task_entry, //Task Entry "uart_event", //Task Name - CONFIG_UART_EVENT_TASK_STACK_SIZE, //Task Stack Size(Bytes) + CONFIG_EXAMPLE_UART_EVENT_TASK_STACK_SIZE, //Task Stack Size(Bytes) esp_dte, //Task Parameter - CONFIG_UART_EVENT_TASK_PRIORITY, //Task Priority + CONFIG_EXAMPLE_UART_EVENT_TASK_PRIORITY, //Task Priority & (esp_dte->uart_event_task_hdl) //Task Handler ); MODEM_CHECK(ret == pdTRUE, "create uart event task failed", err_tsk_create); @@ -573,7 +573,7 @@ esp_err_t esp_modem_setup_ppp(modem_dte_t *dte) MODEM_CHECK(dce, "DTE has not yet bind with DCE", err); esp_modem_dte_t *esp_dte = __containerof(dte, esp_modem_dte_t, parent); /* Set PDP Context */ - MODEM_CHECK(dce->define_pdp_context(dce, 1, "IP", CONFIG_ESP_MODEM_APN) == ESP_OK, "set MODEM APN failed", err); + MODEM_CHECK(dce->define_pdp_context(dce, 1, "IP", CONFIG_EXAMPLE_MODEM_APN) == ESP_OK, "set MODEM APN failed", err); /* Enter PPP mode */ MODEM_CHECK(dte->change_mode(dte, MODEM_PPP_MODE) == ESP_OK, "enter ppp mode failed", err); /* Create PPPoS interface */ @@ -589,9 +589,9 @@ esp_err_t esp_modem_setup_ppp(modem_dte_t *dte) ppp_set_usepeerdns(esp_dte->ppp, 1); /* Auth configuration */ #if PAP_SUPPORT - pppapi_set_auth(esp_dte->ppp, PPPAUTHTYPE_PAP, CONFIG_ESP_MODEM_PPP_AUTH_USERNAME, CONFIG_ESP_MODEM_PPP_AUTH_PASSWORD); + pppapi_set_auth(esp_dte->ppp, PPPAUTHTYPE_PAP, CONFIG_EXAMPLE_MODEM_PPP_AUTH_USERNAME, CONFIG_EXAMPLE_MODEM_PPP_AUTH_PASSWORD); #elif CHAP_SUPPORT - pppapi_set_auth(esp_dte->ppp, PPPAUTHTYPE_CHAP, CONFIG_ESP_MODEM_PPP_AUTH_USERNAME, CONFIG_ESP_MODEM_PPP_AUTH_PASSWORD); + pppapi_set_auth(esp_dte->ppp, PPPAUTHTYPE_CHAP, CONFIG_EXAMPLE_MODEM_PPP_AUTH_USERNAME, CONFIG_EXAMPLE_MODEM_PPP_AUTH_PASSWORD); #else #error "Unsupported AUTH Negotiation" #endif diff --git a/examples/protocols/pppos_client/main/Kconfig.projbuild b/examples/protocols/pppos_client/main/Kconfig.projbuild index 69cca758a9..7d84465642 100644 --- a/examples/protocols/pppos_client/main/Kconfig.projbuild +++ b/examples/protocols/pppos_client/main/Kconfig.projbuild @@ -1,47 +1,47 @@ menu "Example Configuration" - choice ESP_MODEM_DEVICE + choice EXAMPLE_MODEM_DEVICE prompt "Choose supported modem device (DCE)" - default ESP_MODEM_DEVICE_BG96 + default EXAMPLE_MODEM_DEVICE_BG96 help Select modem device connected to the ESP DTE. - config ESP_MODEM_DEVICE_SIM800 + config EXAMPLE_MODEM_DEVICE_SIM800 bool "SIM800" help SIMCom SIM800L is a GSM/GPRS module. It supports Quad-band 850/900/1800/1900MHz. - config ESP_MODEM_DEVICE_BG96 + config EXAMPLE_MODEM_DEVICE_BG96 bool "BG96" help Quectel BG96 is a series of LTE Cat M1/Cat NB1/EGPRS module. endchoice - config ESP_MODEM_APN + config EXAMPLE_MODEM_APN string "Set Access Point Name (APN)" default "CMNET" help Logical name which is used to select the GGSN or the external packet data network. - config ESP_MODEM_PPP_AUTH_USERNAME + config EXAMPLE_MODEM_PPP_AUTH_USERNAME string "Set username for authentication" default "espressif" help Set username for PPP Authentication. - config ESP_MODEM_PPP_AUTH_PASSWORD + config EXAMPLE_MODEM_PPP_AUTH_PASSWORD string "Set password for authentication" default "esp32" help Set password for PPP Authentication. - config SEND_MSG + config EXAMPLE_SEND_MSG bool "Short message (SMS)" default n help Select this, the modem will send a short message before power off. - if SEND_MSG - config SEND_MSG_PEER_PHONE_NUMBER + if EXAMPLE_SEND_MSG + config EXAMPLE_SEND_MSG_PEER_PHONE_NUMBER string "Peer Phone Number (with area code)" default "+8610086" help @@ -49,70 +49,70 @@ menu "Example Configuration" endif menu "UART Configuration" - config MODEM_TX_PIN + config EXAMPLE_UART_MODEM_TX_PIN int "TXD Pin Number" default 25 range 0 31 help Pin number of UART TX. - config MODEM_RX_PIN + config EXAMPLE_UART_MODEM_RX_PIN int "RXD Pin Number" default 26 range 0 31 help Pin number of UART RX. - config MODEM_RTS_PIN + config EXAMPLE_UART_MODEM_RTS_PIN int "RTS Pin Number" default 27 range 0 31 help Pin number of UART RTS. - config MODEM_CTS_PIN + config EXAMPLE_UART_MODEM_CTS_PIN int "CTS Pin Number" default 23 range 0 31 help Pin number of UART CTS. - config UART_EVENT_TASK_STACK_SIZE + config EXAMPLE_UART_EVENT_TASK_STACK_SIZE int "UART Event Task Stack Size" range 2000 6000 default 2048 help Stack size of UART event task. - config UART_EVENT_TASK_PRIORITY + config EXAMPLE_UART_EVENT_TASK_PRIORITY int "UART Event Task Priority" range 3 22 default 5 help Priority of UART event task. - config UART_EVENT_QUEUE_SIZE + config EXAMPLE_UART_EVENT_QUEUE_SIZE int "UART Event Queue Size" range 10 40 default 30 help Length of UART event queue. - config UART_PATTERN_QUEUE_SIZE + config EXAMPLE_UART_PATTERN_QUEUE_SIZE int "UART Pattern Queue Size" range 10 40 default 20 help Length of UART pattern queue. - config UART_TX_BUFFER_SIZE + config EXAMPLE_UART_TX_BUFFER_SIZE int "UART TX Buffer Size" range 256 2048 default 512 help Buffer size of UART TX buffer. - config UART_RX_BUFFER_SIZE + config EXAMPLE_UART_RX_BUFFER_SIZE int "UART RX Buffer Size" range 256 2048 default 1024 diff --git a/examples/protocols/pppos_client/main/pppos_client_main.c b/examples/protocols/pppos_client/main/pppos_client_main.c index 1ef9d2c1f1..bd706f6fd6 100644 --- a/examples/protocols/pppos_client/main/pppos_client_main.c +++ b/examples/protocols/pppos_client/main/pppos_client_main.c @@ -24,7 +24,7 @@ static const int CONNECT_BIT = BIT0; static const int STOP_BIT = BIT1; static const int GOT_DATA_BIT = BIT2; -#if CONFIG_SEND_MSG +#if CONFIG_EXAMPLE_SEND_MSG /** * @brief This example will also show how to send short message using the infrastructure provided by esp modem library. * @note Not all modem support SMG. @@ -189,9 +189,9 @@ void app_main() /* Register event handler */ ESP_ERROR_CHECK(esp_modem_add_event_handler(dte, modem_event_handler, NULL)); /* create dce object */ -#if CONFIG_ESP_MODEM_DEVICE_SIM800 +#if CONFIG_EXAMPLE_MODEM_DEVICE_SIM800 modem_dce_t *dce = sim800_init(dte); -#elif CONFIG_ESP_MODEM_DEVICE_BG96 +#elif CONFIG_EXAMPLE_MODEM_DEVICE_BG96 modem_dce_t *dce = bg96_init(dte); #else #error "Unsupported DCE" @@ -227,9 +227,9 @@ void app_main() /* Exit PPP mode */ ESP_ERROR_CHECK(esp_modem_exit_ppp(dte)); xEventGroupWaitBits(event_group, STOP_BIT, pdTRUE, pdTRUE, portMAX_DELAY); -#if CONFIG_SEND_MSG +#if CONFIG_EXAMPLE_SEND_MSG const char *message = "Welcome to ESP32!"; - ESP_ERROR_CHECK(example_send_message_text(dce, CONFIG_SEND_MSG_PEER_PHONE_NUMBER, message)); + ESP_ERROR_CHECK(example_send_message_text(dce, CONFIG_EXAMPLE_SEND_MSG_PEER_PHONE_NUMBER, message)); ESP_LOGI(TAG, "Send send message [%s] ok", message); #endif /* Power down module */ diff --git a/examples/provisioning/ble_prov/main/Kconfig.projbuild b/examples/provisioning/ble_prov/main/Kconfig.projbuild index b236d0551a..b1578f84b3 100644 --- a/examples/provisioning/ble_prov/main/Kconfig.projbuild +++ b/examples/provisioning/ble_prov/main/Kconfig.projbuild @@ -1,6 +1,6 @@ menu "Example Configuration" - config USE_SEC_1 + config EXAMPLE_USE_SEC_1 bool default y prompt "Use Security Version 1" @@ -8,9 +8,9 @@ menu "Example Configuration" Security version 1 used Curve25519 key exchange for establishing secure session between device and client during provisioning - config USE_POP + config EXAMPLE_USE_POP bool - depends on USE_SEC_1 + depends on EXAMPLE_USE_SEC_1 default y prompt "Use proof-of-possession" help @@ -18,12 +18,12 @@ menu "Example Configuration" in possession of the user who is provisioning the device. This proof-of-possession is internally used to generate the shared secret through key exchange. - config POP + config EXAMPLE_POP string "Proof-of-possession" default "abcd1234" - depends on USE_POP + depends on EXAMPLE_USE_POP - config RESET_PROVISIONED + config EXAMPLE_RESET_PROVISIONED bool default n prompt "Reset provisioned status of the device" @@ -31,7 +31,7 @@ menu "Example Configuration" This erases the NVS to reset provisioned status of the device on every reboot. Provisioned status is determined by the Wi-Fi STA configuration, saved on the NVS. - config AP_RECONN_ATTEMPTS + config EXAMPLE_AP_RECONN_ATTEMPTS int "Maximum AP connection attempts" default 5 help diff --git a/examples/provisioning/ble_prov/main/app_main.c b/examples/provisioning/ble_prov/main/app_main.c index 6341c9fe3d..6ce1184c26 100644 --- a/examples/provisioning/ble_prov/main/app_main.c +++ b/examples/provisioning/ble_prov/main/app_main.c @@ -21,7 +21,7 @@ #include "app_prov.h" -#define EXAMPLE_AP_RECONN_ATTEMPTS CONFIG_AP_RECONN_ATTEMPTS +#define EXAMPLE_AP_RECONN_ATTEMPTS CONFIG_EXAMPLE_AP_RECONN_ATTEMPTS static const char *TAG = "app"; @@ -94,15 +94,15 @@ static void start_ble_provisioning() /* Proof of possession */ const protocomm_security_pop_t *pop = NULL; -#ifdef CONFIG_USE_SEC_1 +#ifdef CONFIG_EXAMPLE_USE_SEC_1 security = 1; #endif /* Having proof of possession is optional */ -#ifdef CONFIG_USE_POP +#ifdef CONFIG_EXAMPLE_USE_POP const static protocomm_security_pop_t app_pop = { - .data = (uint8_t *) CONFIG_POP, - .len = (sizeof(CONFIG_POP)-1) + .data = (uint8_t *) CONFIG_EXAMPLE_POP, + .len = (sizeof(CONFIG_EXAMPLE_POP)-1) }; pop = &app_pop; #endif diff --git a/examples/provisioning/ble_prov/main/app_prov.c b/examples/provisioning/ble_prov/main/app_prov.c index be9b0d2f81..58a9d44e62 100644 --- a/examples/provisioning/ble_prov/main/app_prov.c +++ b/examples/provisioning/ble_prov/main/app_prov.c @@ -253,7 +253,7 @@ esp_err_t app_prov_is_provisioned(bool *provisioned) { *provisioned = false; -#ifdef CONFIG_RESET_PROVISIONED +#ifdef CONFIG_EXAMPLE_RESET_PROVISIONED nvs_flash_erase(); #endif diff --git a/examples/provisioning/console_prov/main/Kconfig.projbuild b/examples/provisioning/console_prov/main/Kconfig.projbuild index b236d0551a..b1578f84b3 100644 --- a/examples/provisioning/console_prov/main/Kconfig.projbuild +++ b/examples/provisioning/console_prov/main/Kconfig.projbuild @@ -1,6 +1,6 @@ menu "Example Configuration" - config USE_SEC_1 + config EXAMPLE_USE_SEC_1 bool default y prompt "Use Security Version 1" @@ -8,9 +8,9 @@ menu "Example Configuration" Security version 1 used Curve25519 key exchange for establishing secure session between device and client during provisioning - config USE_POP + config EXAMPLE_USE_POP bool - depends on USE_SEC_1 + depends on EXAMPLE_USE_SEC_1 default y prompt "Use proof-of-possession" help @@ -18,12 +18,12 @@ menu "Example Configuration" in possession of the user who is provisioning the device. This proof-of-possession is internally used to generate the shared secret through key exchange. - config POP + config EXAMPLE_POP string "Proof-of-possession" default "abcd1234" - depends on USE_POP + depends on EXAMPLE_USE_POP - config RESET_PROVISIONED + config EXAMPLE_RESET_PROVISIONED bool default n prompt "Reset provisioned status of the device" @@ -31,7 +31,7 @@ menu "Example Configuration" This erases the NVS to reset provisioned status of the device on every reboot. Provisioned status is determined by the Wi-Fi STA configuration, saved on the NVS. - config AP_RECONN_ATTEMPTS + config EXAMPLE_AP_RECONN_ATTEMPTS int "Maximum AP connection attempts" default 5 help diff --git a/examples/provisioning/console_prov/main/app_main.c b/examples/provisioning/console_prov/main/app_main.c index b149e5cee5..35b3d575e9 100644 --- a/examples/provisioning/console_prov/main/app_main.c +++ b/examples/provisioning/console_prov/main/app_main.c @@ -21,7 +21,7 @@ #include "app_prov.h" -#define EXAMPLE_AP_RECONN_ATTEMPTS CONFIG_AP_RECONN_ATTEMPTS +#define EXAMPLE_AP_RECONN_ATTEMPTS CONFIG_EXAMPLE_AP_RECONN_ATTEMPTS static const char *TAG = "app"; @@ -65,15 +65,15 @@ static void start_console_provisioning() /* Proof of possession */ const protocomm_security_pop_t *pop = NULL; -#ifdef CONFIG_USE_SEC_1 +#ifdef CONFIG_EXAMPLE_USE_SEC_1 security = 1; #endif /* Having proof of possession is optional */ -#ifdef CONFIG_USE_POP +#ifdef CONFIG_EXAMPLE_USE_POP const static protocomm_security_pop_t app_pop = { - .data = (uint8_t *) CONFIG_POP, - .len = (sizeof(CONFIG_POP)-1) + .data = (uint8_t *) CONFIG_EXAMPLE_POP, + .len = (sizeof(CONFIG_EXAMPLE_POP)-1) }; pop = &app_pop; #endif diff --git a/examples/provisioning/console_prov/main/app_prov.c b/examples/provisioning/console_prov/main/app_prov.c index ce3e520430..b260db5f42 100644 --- a/examples/provisioning/console_prov/main/app_prov.c +++ b/examples/provisioning/console_prov/main/app_prov.c @@ -219,7 +219,7 @@ esp_err_t app_prov_is_provisioned(bool *provisioned) { *provisioned = false; -#ifdef CONFIG_RESET_PROVISIONED +#ifdef CONFIG_EXAMPLE_RESET_PROVISIONED nvs_flash_erase(); #endif diff --git a/examples/provisioning/custom_config/main/Kconfig.projbuild b/examples/provisioning/custom_config/main/Kconfig.projbuild index 2718e834c0..0d353fdbb0 100644 --- a/examples/provisioning/custom_config/main/Kconfig.projbuild +++ b/examples/provisioning/custom_config/main/Kconfig.projbuild @@ -1,18 +1,18 @@ menu "Example Configuration" - config SOFTAP_SSID + config EXAMPLE_SSID string "Wi-Fi SSID" default "myssid" help SSID (network name) for the example to connect to. - config SOFTAP_PASS + config EXAMPLE_PASS string "Wi-Fi Password" default "mypassword" help Wi-Fi password (WPA or WPA2) for the example to use. - config USE_SEC_1 + config EXAMPLE_USE_SEC_1 bool default n prompt "Use Security Version 1" @@ -20,9 +20,9 @@ menu "Example Configuration" Security version 1 used Curve25519 key exchange for establishing secure session between device and client during provisioning - config USE_POP + config EXAMPLE_USE_POP bool - depends on USE_SEC_1 + depends on EXAMPLE_USE_SEC_1 default n prompt "Use proof-of-possession" help @@ -30,18 +30,18 @@ menu "Example Configuration" in possession of the user who is provisioning the device. This proof-of-possession is internally used to generate the shared secret through key exchange. - config POP + config EXAMPLE_POP string "Proof-of-possession" default "abcd1234" - depends on USE_POP + depends on EXAMPLE_USE_POP - config PROTOCOMM_HTTPD_PORT + config EXAMPLE_PROTOCOMM_HTTPD_PORT int "Protocomm HTTP Port" default 80 help Port on which to run Protocomm HTTP based provisioning service - config RESET_PROVISIONED + config EXAMPLE_RESET_PROVISIONED bool default n prompt "Reset provisioned status of the device" @@ -49,7 +49,7 @@ menu "Example Configuration" This erases the NVS to reset provisioned status of the device on every reboot. Provisioned status is determined by the Wi-Fi STA configuration, saved on the NVS. - config AP_RECONN_ATTEMPTS + config EXAMPLE_AP_RECONN_ATTEMPTS int "Maximum AP connection attempts" default 5 help diff --git a/examples/provisioning/custom_config/main/app_main.c b/examples/provisioning/custom_config/main/app_main.c index 583894e767..7b23c883c9 100644 --- a/examples/provisioning/custom_config/main/app_main.c +++ b/examples/provisioning/custom_config/main/app_main.c @@ -21,7 +21,7 @@ #include "app_prov.h" -#define EXAMPLE_AP_RECONN_ATTEMPTS CONFIG_AP_RECONN_ATTEMPTS +#define EXAMPLE_AP_RECONN_ATTEMPTS CONFIG_EXAMPLE_AP_RECONN_ATTEMPTS static const char *TAG = "app"; @@ -65,21 +65,21 @@ static void start_softap_provisioning() /* Proof of possession */ const protocomm_security_pop_t *pop = NULL; -#ifdef CONFIG_USE_SEC_1 +#ifdef CONFIG_EXAMPLE_USE_SEC_1 security = 1; #endif /* Having proof of possession is optional */ -#ifdef CONFIG_USE_POP +#ifdef CONFIG_EXAMPLE_USE_POP const static protocomm_security_pop_t app_pop = { - .data = (uint8_t *) CONFIG_POP, - .len = (sizeof(CONFIG_POP)-1) + .data = (uint8_t *) CONFIG_EXAMPLE_POP, + .len = (sizeof(CONFIG_EXAMPLE_POP)-1) }; pop = &app_pop; #endif ESP_ERROR_CHECK(app_prov_start_softap_provisioning( - CONFIG_SOFTAP_SSID, CONFIG_SOFTAP_PASS, security, pop)); + CONFIG_EXAMPLE_SSID, CONFIG_EXAMPLE_PASS, security, pop)); } void app_main() diff --git a/examples/provisioning/custom_config/main/app_prov.c b/examples/provisioning/custom_config/main/app_prov.c index e7bb4086c8..4c30ac2186 100644 --- a/examples/provisioning/custom_config/main/app_prov.c +++ b/examples/provisioning/custom_config/main/app_prov.c @@ -244,7 +244,7 @@ esp_err_t app_prov_is_provisioned(bool *provisioned) { *provisioned = false; -#ifdef CONFIG_RESET_PROVISIONED +#ifdef CONFIG_EXAMPLE_RESET_PROVISIONED nvs_flash_erase(); #endif diff --git a/examples/provisioning/softap_prov/main/Kconfig.projbuild b/examples/provisioning/softap_prov/main/Kconfig.projbuild index 8f7da88ae9..d0fa309666 100644 --- a/examples/provisioning/softap_prov/main/Kconfig.projbuild +++ b/examples/provisioning/softap_prov/main/Kconfig.projbuild @@ -1,25 +1,25 @@ menu "Example Configuration" - config SOFTAP_SSID_SET_MAC + config EXAMPLE_SSID_SET_MAC bool "Use MAC as SSID" default y help Set SoftAP SSID as PROV_. - config SOFTAP_SSID + config EXAMPLE_SSID string "Wi-Fi SSID" default "PROV_SSID" - depends on !SOFTAP_SSID_SET_MAC + depends on !EXAMPLE_SSID_SET_MAC help SSID (network name) for the example to connect to. - config SOFTAP_PASS + config EXAMPLE_PASS string "Wi-Fi Password" default "PROV_PASS" help Wi-Fi password (WPA or WPA2) for the example to use. - config USE_SEC_1 + config EXAMPLE_USE_SEC_1 bool default y prompt "Use Security Version 1" @@ -27,9 +27,9 @@ menu "Example Configuration" Security version 1 used Curve25519 key exchange for establishing secure session between device and client during provisioning - config USE_POP + config EXAMPLE_USE_POP bool - depends on USE_SEC_1 + depends on EXAMPLE_USE_SEC_1 default y prompt "Use proof-of-possession" help @@ -37,12 +37,12 @@ menu "Example Configuration" in possession of the user who is provisioning the device. This proof-of-possession is internally used to generate the shared secret through key exchange. - config POP + config EXAMPLE_POP string "Proof-of-possession" default "abcd1234" - depends on USE_POP + depends on EXAMPLE_USE_POP - config RESET_PROVISIONED + config EXAMPLE_RESET_PROVISIONED bool default n prompt "Reset provisioned status of the device" @@ -50,7 +50,7 @@ menu "Example Configuration" This erases the NVS to reset provisioned status of the device on every reboot. Provisioned status is determined by the Wi-Fi STA configuration, saved on the NVS. - config AP_RECONN_ATTEMPTS + config EXAMPLE_AP_RECONN_ATTEMPTS int "Maximum AP connection attempts" default 5 help diff --git a/examples/provisioning/softap_prov/main/app_main.c b/examples/provisioning/softap_prov/main/app_main.c index 4037f5091a..a775f7a2f1 100644 --- a/examples/provisioning/softap_prov/main/app_main.c +++ b/examples/provisioning/softap_prov/main/app_main.c @@ -21,7 +21,7 @@ #include "app_prov.h" -#define EXAMPLE_AP_RECONN_ATTEMPTS CONFIG_AP_RECONN_ATTEMPTS +#define EXAMPLE_AP_RECONN_ATTEMPTS CONFIG_EXAMPLE_AP_RECONN_ATTEMPTS static const char *TAG = "app"; @@ -65,23 +65,23 @@ static void start_softap_provisioning() /* Proof of possession */ const protocomm_security_pop_t *pop = NULL; -#ifdef CONFIG_USE_SEC_1 +#ifdef CONFIG_EXAMPLE_USE_SEC_1 security = 1; #endif /* Having proof of possession is optional */ -#ifdef CONFIG_USE_POP +#ifdef CONFIG_EXAMPLE_USE_POP const static protocomm_security_pop_t app_pop = { - .data = (uint8_t *) CONFIG_POP, - .len = (sizeof(CONFIG_POP)-1) + .data = (uint8_t *) CONFIG_EXAMPLE_POP, + .len = (sizeof(CONFIG_EXAMPLE_POP)-1) }; pop = &app_pop; #endif const char *ssid = NULL; -#ifdef CONFIG_SOFTAP_SSID - ssid = CONFIG_SOFTAP_SSID; +#ifdef CONFIG_EXAMPLE_SSID + ssid = CONFIG_EXAMPLE_SSID; #else uint8_t eth_mac[6]; esp_wifi_get_mac(WIFI_IF_STA, eth_mac); @@ -94,7 +94,7 @@ static void start_softap_provisioning() #endif ESP_ERROR_CHECK(app_prov_start_softap_provisioning( - ssid, CONFIG_SOFTAP_PASS, security, pop)); + ssid, CONFIG_EXAMPLE_PASS, security, pop)); } void app_main() diff --git a/examples/provisioning/softap_prov/main/app_prov.c b/examples/provisioning/softap_prov/main/app_prov.c index 2d625edce0..35ad3edf8e 100644 --- a/examples/provisioning/softap_prov/main/app_prov.c +++ b/examples/provisioning/softap_prov/main/app_prov.c @@ -230,7 +230,7 @@ esp_err_t app_prov_is_provisioned(bool *provisioned) { *provisioned = false; -#ifdef CONFIG_RESET_PROVISIONED +#ifdef CONFIG_EXAMPLE_RESET_PROVISIONED nvs_flash_erase(); #endif diff --git a/examples/system/base_mac_address/main/Kconfig.projbuild b/examples/system/base_mac_address/main/Kconfig.projbuild index ce2b2c35c8..f64f01bf25 100644 --- a/examples/system/base_mac_address/main/Kconfig.projbuild +++ b/examples/system/base_mac_address/main/Kconfig.projbuild @@ -23,10 +23,10 @@ menu "Example Configuration" bool "Other external storage" endchoice - choice BASE_MAC_STORED_EFUSE_BLK3_ERROR_BEHAVIOR + choice BASE_MAC_STORED_EFUSE_BLK3_ERROR_BEHAV prompt "Read base MAC address from BLK3 of eFuse error behavior" depends on BASE_MAC_STORED_EFUSE_BLK3 - default BASE_MAC_STORED_EFUSE_BLK3_ERROR_USE_DEFAULT + default BASE_MAC_STORED_EFUSE_BLK3_ERROR_DEFAULT help Select behavior when reading base MAC address from BLK3 of eFuse error. If "Abort" is selected, esp32 will abort. @@ -35,7 +35,7 @@ menu "Example Configuration" config BASE_MAC_STORED_EFUSE_BLK3_ERROR_ABORT bool "Abort" - config BASE_MAC_STORED_EFUSE_BLK3_ERROR_USE_DEFAULT + config BASE_MAC_STORED_EFUSE_BLK3_ERROR_DEFAULT bool "Use base MAC address from BLK3 of eFuse" endchoice diff --git a/examples/system/ota/advanced_https_ota/main/Kconfig.projbuild b/examples/system/ota/advanced_https_ota/main/Kconfig.projbuild index f3f71e3a84..3bfb017948 100644 --- a/examples/system/ota/advanced_https_ota/main/Kconfig.projbuild +++ b/examples/system/ota/advanced_https_ota/main/Kconfig.projbuild @@ -1,18 +1,18 @@ menu "Example Configuration" - config WIFI_SSID + config EXAMPLE_WIFI_SSID string "WiFi SSID" default "myssid" help SSID (network name) for the example to connect to. - config WIFI_PASSWORD + config EXAMPLE_WIFI_PASSWORD string "WiFi Password" default "mypassword" help WiFi password (WPA or WPA2) for the example to use. - config FIRMWARE_UPGRADE_URL + config EXAMPLE_FIRMWARE_UPGRADE_URL string "firmware upgrade url endpoint" default "https://192.168.0.3:8070/hello-world.bin" help diff --git a/examples/system/ota/advanced_https_ota/main/advanced_https_ota_example.c b/examples/system/ota/advanced_https_ota/main/advanced_https_ota_example.c index 43fd16243f..e2cd48e425 100644 --- a/examples/system/ota/advanced_https_ota/main/advanced_https_ota_example.c +++ b/examples/system/ota/advanced_https_ota/main/advanced_https_ota_example.c @@ -65,8 +65,8 @@ static void initialise_wifi(void) ESP_ERROR_CHECK( esp_wifi_set_storage(WIFI_STORAGE_RAM) ); wifi_config_t wifi_config = { .sta = { - .ssid = CONFIG_WIFI_SSID, - .password = CONFIG_WIFI_PASSWORD, + .ssid = CONFIG_EXAMPLE_WIFI_SSID, + .password = CONFIG_EXAMPLE_WIFI_PASSWORD, }, }; ESP_LOGI(TAG, "Setting WiFi configuration SSID %s", wifi_config.sta.ssid); @@ -104,7 +104,7 @@ void advanced_ota_example_task(void * pvParameter) esp_err_t ota_finish_err = ESP_OK; esp_http_client_config_t config = { - .url = CONFIG_FIRMWARE_UPGRADE_URL, + .url = CONFIG_EXAMPLE_FIRMWARE_UPGRADE_URL, .cert_pem = (char *)server_cert_pem_start, }; diff --git a/examples/system/ota/native_ota_example/main/Kconfig.projbuild b/examples/system/ota/native_ota_example/main/Kconfig.projbuild index ebb9995729..fb50b5a1e8 100644 --- a/examples/system/ota/native_ota_example/main/Kconfig.projbuild +++ b/examples/system/ota/native_ota_example/main/Kconfig.projbuild @@ -1,12 +1,12 @@ menu "Example Configuration" - config WIFI_SSID + config EXAMPLE_WIFI_SSID string "WiFi SSID" default "myssid" help SSID (network name) for the example to connect to. - config WIFI_PASSWORD + config EXAMPLE_WIFI_PASSWORD string "WiFi Password" default "mypassword" help @@ -14,7 +14,7 @@ menu "Example Configuration" Can be left blank if the network has no security set. - config FIRMWARE_UPG_URL + config EXAMPLE_FIRMWARE_UPG_URL string "HTTP Server URL" default "https://192.168.0.3:8070/hello-world.bin" help @@ -22,7 +22,7 @@ menu "Example Configuration" See example README.md for details. - config GPIO_DIAGNOSTIC + config EXAMPLE_GPIO_DIAGNOSTIC int "Number of the GPIO input for diagnostic" range 0 39 default 4 diff --git a/examples/system/ota/native_ota_example/main/native_ota_example.c b/examples/system/ota/native_ota_example/main/native_ota_example.c index 854e77fac4..4b5f158810 100644 --- a/examples/system/ota/native_ota_example/main/native_ota_example.c +++ b/examples/system/ota/native_ota_example/main/native_ota_example.c @@ -24,9 +24,9 @@ #include "nvs_flash.h" #include "driver/gpio.h" -#define EXAMPLE_WIFI_SSID CONFIG_WIFI_SSID -#define EXAMPLE_WIFI_PASS CONFIG_WIFI_PASSWORD -#define EXAMPLE_SERVER_URL CONFIG_FIRMWARE_UPG_URL +#define EXAMPLE_WIFI_SSID CONFIG_EXAMPLE_WIFI_SSID +#define EXAMPLE_WIFI_PASS CONFIG_EXAMPLE_WIFI_PASSWORD +#define EXAMPLE_SERVER_URL CONFIG_EXAMPLE_FIRMWARE_UPG_URL #define BUFFSIZE 1024 #define HASH_LEN 32 /* SHA-256 digest length */ @@ -266,7 +266,7 @@ static bool diagnostic(void) gpio_config_t io_conf; io_conf.intr_type = GPIO_PIN_INTR_DISABLE; io_conf.mode = GPIO_MODE_INPUT; - io_conf.pin_bit_mask = (1ULL << CONFIG_GPIO_DIAGNOSTIC); + io_conf.pin_bit_mask = (1ULL << CONFIG_EXAMPLE_GPIO_DIAGNOSTIC); io_conf.pull_down_en = GPIO_PULLDOWN_DISABLE; io_conf.pull_up_en = GPIO_PULLUP_ENABLE; gpio_config(&io_conf); @@ -274,9 +274,9 @@ static bool diagnostic(void) ESP_LOGI(TAG, "Diagnostics (5 sec)..."); vTaskDelay(5000 / portTICK_PERIOD_MS); - bool diagnostic_is_ok = gpio_get_level(CONFIG_GPIO_DIAGNOSTIC); + bool diagnostic_is_ok = gpio_get_level(CONFIG_EXAMPLE_GPIO_DIAGNOSTIC); - gpio_reset_pin(CONFIG_GPIO_DIAGNOSTIC); + gpio_reset_pin(CONFIG_EXAMPLE_GPIO_DIAGNOSTIC); return diagnostic_is_ok; } diff --git a/examples/system/ota/simple_ota_example/main/Kconfig.projbuild b/examples/system/ota/simple_ota_example/main/Kconfig.projbuild index f3f71e3a84..3bfb017948 100644 --- a/examples/system/ota/simple_ota_example/main/Kconfig.projbuild +++ b/examples/system/ota/simple_ota_example/main/Kconfig.projbuild @@ -1,18 +1,18 @@ menu "Example Configuration" - config WIFI_SSID + config EXAMPLE_WIFI_SSID string "WiFi SSID" default "myssid" help SSID (network name) for the example to connect to. - config WIFI_PASSWORD + config EXAMPLE_WIFI_PASSWORD string "WiFi Password" default "mypassword" help WiFi password (WPA or WPA2) for the example to use. - config FIRMWARE_UPGRADE_URL + config EXAMPLE_FIRMWARE_UPGRADE_URL string "firmware upgrade url endpoint" default "https://192.168.0.3:8070/hello-world.bin" help diff --git a/examples/system/ota/simple_ota_example/main/simple_ota_example.c b/examples/system/ota/simple_ota_example/main/simple_ota_example.c index e03c124967..026f860329 100644 --- a/examples/system/ota/simple_ota_example/main/simple_ota_example.c +++ b/examples/system/ota/simple_ota_example/main/simple_ota_example.c @@ -92,8 +92,8 @@ static void initialise_wifi(void) ESP_ERROR_CHECK( esp_wifi_set_storage(WIFI_STORAGE_RAM) ); wifi_config_t wifi_config = { .sta = { - .ssid = CONFIG_WIFI_SSID, - .password = CONFIG_WIFI_PASSWORD, + .ssid = CONFIG_EXAMPLE_WIFI_SSID, + .password = CONFIG_EXAMPLE_WIFI_PASSWORD, }, }; ESP_LOGI(TAG, "Setting WiFi configuration SSID %s", wifi_config.sta.ssid); @@ -114,7 +114,7 @@ void simple_ota_example_task(void * pvParameter) ESP_LOGI(TAG, "Connected to WiFi network! Attempting to connect to server..."); esp_http_client_config_t config = { - .url = CONFIG_FIRMWARE_UPGRADE_URL, + .url = CONFIG_EXAMPLE_FIRMWARE_UPGRADE_URL, .cert_pem = (char *)server_cert_pem_start, .event_handler = _http_event_handler, }; diff --git a/examples/wifi/espnow/main/Kconfig.projbuild b/examples/wifi/espnow/main/Kconfig.projbuild index 5f597e67b5..62b75f8034 100644 --- a/examples/wifi/espnow/main/Kconfig.projbuild +++ b/examples/wifi/espnow/main/Kconfig.projbuild @@ -1,14 +1,14 @@ menu "Example Configuration" - choice WIFI_MODE + choice ESPNOW_WIFI_MODE prompt "WiFi mode" - default STATION_MODE + default ESPNOW_WIFI_MODE_STATION help WiFi mode(station or softap). - config STATION_MODE + config ESPNOW_WIFI_MODE_STATION bool "Station" - config SOFTAP_MODE + config ESPNOW_WIFI_MODE_STATION_SOFTAP bool "Softap" endchoice @@ -52,7 +52,7 @@ menu "Example Configuration" help Length of ESPNOW data to be sent, unit: byte. - config ENABLE_LONG_RANGE + config ESPNOW_ENABLE_LONG_RANGE bool "Enable Long Range" default "n" help diff --git a/examples/wifi/espnow/main/espnow_example.h b/examples/wifi/espnow/main/espnow_example.h index c1881886c0..2de4f4a00e 100644 --- a/examples/wifi/espnow/main/espnow_example.h +++ b/examples/wifi/espnow/main/espnow_example.h @@ -11,7 +11,7 @@ #define ESPNOW_EXAMPLE_H /* ESPNOW can work in both station and softap mode. It is configured in menuconfig. */ -#if CONFIG_STATION_MODE +#if CONFIG_ESPNOW_WIFI_MODE_STATION #define ESPNOW_WIFI_MODE WIFI_MODE_STA #define ESPNOW_WIFI_IF ESP_IF_WIFI_STA #else diff --git a/examples/wifi/espnow/main/espnow_example_main.c b/examples/wifi/espnow/main/espnow_example_main.c index 9f2d9980db..4d76a5beae 100644 --- a/examples/wifi/espnow/main/espnow_example_main.c +++ b/examples/wifi/espnow/main/espnow_example_main.c @@ -56,7 +56,7 @@ static void example_wifi_init(void) */ ESP_ERROR_CHECK( esp_wifi_set_channel(CONFIG_ESPNOW_CHANNEL, 0) ); -#if CONFIG_ENABLE_LONG_RANGE +#if CONFIG_ESPNOW_ENABLE_LONG_RANGE ESP_ERROR_CHECK( esp_wifi_set_protocol(ESPNOW_WIFI_IF, WIFI_PROTOCOL_11B|WIFI_PROTOCOL_11G|WIFI_PROTOCOL_11N|WIFI_PROTOCOL_LR) ); #endif } diff --git a/examples/wifi/getting_started/softAP/main/Kconfig.projbuild b/examples/wifi/getting_started/softAP/main/Kconfig.projbuild index bc4c17f261..3782905021 100644 --- a/examples/wifi/getting_started/softAP/main/Kconfig.projbuild +++ b/examples/wifi/getting_started/softAP/main/Kconfig.projbuild @@ -12,7 +12,7 @@ menu "Example Configuration" help WiFi password (WPA or WPA2) for the example to use. - config MAX_STA_CONN + config ESP_MAX_STA_CONN int "Maximal STA connections" default 4 help diff --git a/examples/wifi/getting_started/softAP/main/softap_example_main.c b/examples/wifi/getting_started/softAP/main/softap_example_main.c index 8402241f06..014c439636 100644 --- a/examples/wifi/getting_started/softAP/main/softap_example_main.c +++ b/examples/wifi/getting_started/softAP/main/softap_example_main.c @@ -26,7 +26,7 @@ */ #define EXAMPLE_ESP_WIFI_SSID CONFIG_ESP_WIFI_SSID #define EXAMPLE_ESP_WIFI_PASS CONFIG_ESP_WIFI_PASSWORD -#define EXAMPLE_MAX_STA_CONN CONFIG_MAX_STA_CONN +#define EXAMPLE_MAX_STA_CONN CONFIG_ESP_MAX_STA_CONN /* FreeRTOS event group to signal when we are connected*/ static EventGroupHandle_t s_wifi_event_group; diff --git a/examples/wifi/power_save/main/Kconfig.projbuild b/examples/wifi/power_save/main/Kconfig.projbuild index 24d928408d..27ee75660f 100644 --- a/examples/wifi/power_save/main/Kconfig.projbuild +++ b/examples/wifi/power_save/main/Kconfig.projbuild @@ -1,18 +1,18 @@ menu "Example Configuration" - config WIFI_SSID + config EXAMPLE_WIFI_SSID string "WiFi SSID" default "myssid" help SSID (network name) for the example to connect to. - config WIFI_PASSWORD + config EXAMPLE_WIFI_PASSWORD string "WiFi Password" default "mypassword" help WiFi password (WPA or WPA2) for the example to use. - config WIFI_LISTEN_INTERVAL + config EXAMPLE_WIFI_LISTEN_INTERVAL int "WiFi listen interval" default 3 help @@ -20,9 +20,9 @@ menu "Example Configuration" For example, if beacon interval is 100 ms and listen interval is 3, the interval for station to listen to beacon is 300 ms. - choice POWER_SAVE_MODE + choice EXAMPLE_POWER_SAVE_MODE prompt "power save mode" - default POWER_SAVE_MIN_MODEM + default EXAMPLE_POWER_SAVE_MIN_MODEM help Power save mode for the esp32 to use. Modem sleep mode includes minimum and maximum power save modes. In minimum power save mode, station wakes up every DTIM to receive beacon. Broadcast data will not be @@ -32,11 +32,11 @@ menu "Example Configuration" may be lost because station may be in sleep state at DTIM time. If listen interval is longer, more power is saved but broadcast data is more easy to lose. - config POWER_SAVE_NONE + config EXAMPLE_POWER_SAVE_NONE bool "none" - config POWER_SAVE_MIN_MODEM + config EXAMPLE_POWER_SAVE_MIN_MODEM bool "minimum modem" - config POWER_SAVE_MAX_MODEM + config EXAMPLE_POWER_SAVE_MAX_MODEM bool "maximum modem" endchoice diff --git a/examples/wifi/power_save/main/power_save.c b/examples/wifi/power_save/main/power_save.c index 417b4c9d8f..04f60cb66d 100644 --- a/examples/wifi/power_save/main/power_save.c +++ b/examples/wifi/power_save/main/power_save.c @@ -21,16 +21,16 @@ #include "nvs_flash.h" /*set the ssid and password via "make menuconfig"*/ -#define DEFAULT_SSID CONFIG_WIFI_SSID -#define DEFAULT_PWD CONFIG_WIFI_PASSWORD +#define DEFAULT_SSID CONFIG_EXAMPLE_WIFI_SSID +#define DEFAULT_PWD CONFIG_EXAMPLE_WIFI_PASSWORD -#define DEFAULT_LISTEN_INTERVAL CONFIG_WIFI_LISTEN_INTERVAL +#define DEFAULT_LISTEN_INTERVAL CONFIG_EXAMPLE_WIFI_LISTEN_INTERVAL -#if CONFIG_POWER_SAVE_MIN_MODEM +#if CONFIG_EXAMPLE_POWER_SAVE_MIN_MODEM #define DEFAULT_PS_MODE WIFI_PS_MIN_MODEM -#elif CONFIG_POWER_SAVE_MAX_MODEM +#elif CONFIG_EXAMPLE_POWER_SAVE_MAX_MODEM #define DEFAULT_PS_MODE WIFI_PS_MAX_MODEM -#elif CONFIG_POWER_SAVE_NONE +#elif CONFIG_EXAMPLE_POWER_SAVE_NONE #define DEFAULT_PS_MODE WIFI_PS_NONE #else #define DEFAULT_PS_MODE WIFI_PS_NONE diff --git a/examples/wifi/scan/main/Kconfig.projbuild b/examples/wifi/scan/main/Kconfig.projbuild index b3fc5d73ba..95f738919c 100644 --- a/examples/wifi/scan/main/Kconfig.projbuild +++ b/examples/wifi/scan/main/Kconfig.projbuild @@ -1,67 +1,67 @@ menu "Example Configuration" - config WIFI_SSID + config EXAMPLE_WIFI_SSID string "WiFi SSID" default "myssid" help SSID (network name) for the example to connect to. - config WIFI_PASSWORD + config EXAMPLE_WIFI_PASSWORD string "WiFi Password" default "mypassword" help WiFi password (WPA or WPA2) for the example to use. - choice SCAN_METHOD + choice EXAMPLE_SCAN_METHOD prompt "scan method" - default WIFI_FAST_SCAN + default EXAMPLE_WIFI_FAST_SCAN help scan method for the esp32 to use - config WIFI_FAST_SCAN + config EXAMPLE_WIFI_FAST_SCAN bool "fast" - config WIFI_ALL_CHANNEL_SCAN + config EXAMPLE_WIFI_ALL_CHANNEL_SCAN bool "all" endchoice - choice SORT_METHOD + choice EXAMPLE_SORT_METHOD prompt "sort method" - default WIFI_CONNECT_AP_BY_SIGNAL + default EXAMPLE_WIFI_CONNECT_AP_BY_SIGNAL help sort method for the esp32 to use - config WIFI_CONNECT_AP_BY_SIGNAL + config EXAMPLE_WIFI_CONNECT_AP_BY_SIGNAL bool "rssi" - config WIFI_CONNECT_AP_BY_SECURITY + config EXAMPLE_WIFI_CONNECT_AP_BY_SECURITY bool "authmode" endchoice - config FAST_SCAN_THRESHOLD + config EXAMPLE_FAST_SCAN_THRESHOLD bool "fast scan threshold" default y help wifi fast scan threshold - config FAST_SCAN_MINIMUM_SIGNAL + config EXAMPLE_FAST_SCAN_MINIMUM_SIGNAL int "fast scan minimum rssi" - depends on FAST_SCAN_THRESHOLD + depends on EXAMPLE_FAST_SCAN_THRESHOLD range -127 0 default -127 help rssi is use to measure the signal - choice FAST_SCAN_WEAKEST_AUTHMODE + choice EXAMPLE_FAST_SCAN_WEAKEST_AUTHMODE prompt "fast scan weakest authmode" - depends on FAST_SCAN_THRESHOLD - default EXAMPLE_OPEN + depends on EXAMPLE_FAST_SCAN_THRESHOLD + default EXAMPLE_FAST_SCAN_WEAKEST_AUTHMODE_OPEN - config EXAMPLE_OPEN + config EXAMPLE_FAST_SCAN_WEAKEST_AUTHMODE_OPEN bool "open" - config EXAMPLE_WEP + config EXAMPLE_FAST_SCAN_WEAKEST_AUTHMODE_WEP bool "wep" - config EXAMPLE_WPA + config EXAMPLE_FAST_SCAN_WEAKEST_AUTHMODE_WPA bool "wpa" - config EXAMPLE_WPA2 + config EXAMPLE_FAST_SCAN_WEAKEST_AUTHMODE_WPA2 bool "wpa2" endchoice diff --git a/examples/wifi/scan/main/scan.c b/examples/wifi/scan/main/scan.c index 15235b20cb..9607d61147 100644 --- a/examples/wifi/scan/main/scan.c +++ b/examples/wifi/scan/main/scan.c @@ -29,34 +29,34 @@ #include "nvs_flash.h" /*Set the SSID and Password via "make menuconfig"*/ -#define DEFAULT_SSID CONFIG_WIFI_SSID -#define DEFAULT_PWD CONFIG_WIFI_PASSWORD +#define DEFAULT_SSID CONFIG_EXAMPLE_WIFI_SSID +#define DEFAULT_PWD CONFIG_EXAMPLE_WIFI_PASSWORD -#if CONFIG_WIFI_ALL_CHANNEL_SCAN +#if CONFIG_EXAMPLE_WIFI_ALL_CHANNEL_SCAN #define DEFAULT_SCAN_METHOD WIFI_ALL_CHANNEL_SCAN -#elif CONFIG_WIFI_FAST_SCAN +#elif CONFIG_EXAMPLE_WIFI_FAST_SCAN #define DEFAULT_SCAN_METHOD WIFI_FAST_SCAN #else #define DEFAULT_SCAN_METHOD WIFI_FAST_SCAN -#endif /*CONFIG_SCAN_METHOD*/ +#endif /*CONFIG_EXAMPLE_SCAN_METHOD*/ -#if CONFIG_WIFI_CONNECT_AP_BY_SIGNAL +#if CONFIG_EXAMPLE_WIFI_CONNECT_AP_BY_SIGNAL #define DEFAULT_SORT_METHOD WIFI_CONNECT_AP_BY_SIGNAL -#elif CONFIG_WIFI_CONNECT_AP_BY_SECURITY +#elif CONFIG_EXAMPLE_WIFI_CONNECT_AP_BY_SECURITY #define DEFAULT_SORT_METHOD WIFI_CONNECT_AP_BY_SECURITY #else #define DEFAULT_SORT_METHOD WIFI_CONNECT_AP_BY_SIGNAL -#endif /*CONFIG_SORT_METHOD*/ +#endif /*CONFIG_EXAMPLE_SORT_METHOD*/ -#if CONFIG_FAST_SCAN_THRESHOLD -#define DEFAULT_RSSI CONFIG_FAST_SCAN_MINIMUM_SIGNAL -#if CONFIG_EXAMPLE_OPEN +#if CONFIG_EXAMPLE_FAST_SCAN_THRESHOLD +#define DEFAULT_RSSI CONFIG_EXAMPLE_FAST_SCAN_MINIMUM_SIGNAL +#if CONFIG_EXAMPLE_FAST_SCAN_WEAKEST_AUTHMODE_OPEN #define DEFAULT_AUTHMODE WIFI_AUTH_OPEN -#elif CONFIG_EXAMPLE_WEP +#elif CONFIG_EXAMPLE_FAST_SCAN_WEAKEST_AUTHMODE_WEP #define DEFAULT_AUTHMODE WIFI_AUTH_WEP -#elif CONFIG_EXAMPLE_WPA +#elif CONFIG_EXAMPLE_FAST_SCAN_WEAKEST_AUTHMODE_WPA #define DEFAULT_AUTHMODE WIFI_AUTH_WPA_PSK -#elif CONFIG_EXAMPLE_WPA2 +#elif CONFIG_EXAMPLE_FAST_SCAN_WEAKEST_AUTHMODE_WPA2 #define DEFAULT_AUTHMODE WIFI_AUTH_WPA2_PSK #else #define DEFAULT_AUTHMODE WIFI_AUTH_OPEN @@ -64,7 +64,7 @@ #else #define DEFAULT_RSSI -127 #define DEFAULT_AUTHMODE WIFI_AUTH_OPEN -#endif /*CONFIG_FAST_SCAN_THRESHOLD*/ +#endif /*CONFIG_EXAMPLE_FAST_SCAN_THRESHOLD*/ static const char *TAG = "scan"; diff --git a/examples/wifi/simple_sniffer/main/Kconfig.projbuild b/examples/wifi/simple_sniffer/main/Kconfig.projbuild index 096af2c66c..c85abc6508 100644 --- a/examples/wifi/simple_sniffer/main/Kconfig.projbuild +++ b/examples/wifi/simple_sniffer/main/Kconfig.projbuild @@ -1,6 +1,6 @@ menu "Example Configuration" - config STORE_HISTORY + config SNIFFER_STORE_HISTORY bool "Store command history into flash" default y help @@ -30,7 +30,7 @@ menu "Example Configuration" help Specify the mount point in the VFS (Virtual File System) for SD card. - config PCAP_FILE_NAME_MAX_LEN + config SNIFFER_PCAP_FILE_NAME_MAX_LEN int "Max name length of pcap file" default 32 help diff --git a/examples/wifi/simple_sniffer/main/cmd_sniffer.c b/examples/wifi/simple_sniffer/main/cmd_sniffer.c index a756eba438..e41f9941fc 100644 --- a/examples/wifi/simple_sniffer/main/cmd_sniffer.c +++ b/examples/wifi/simple_sniffer/main/cmd_sniffer.c @@ -22,7 +22,7 @@ #include "sdkconfig.h" #define SNIFFER_DEFAULT_FILE_NAME "esp-sniffer" -#define SNIFFER_FILE_NAME_MAX_LEN CONFIG_PCAP_FILE_NAME_MAX_LEN +#define SNIFFER_FILE_NAME_MAX_LEN CONFIG_SNIFFER_PCAP_FILE_NAME_MAX_LEN #define SNIFFER_DEFAULT_CHANNEL (1) #define SNIFFER_PAYLOAD_FCS_LEN (4) #define SNIFFER_PROCESS_PACKET_TIMEOUT_MS (100) diff --git a/examples/wifi/simple_sniffer/main/simple_sniffer_example_main.c b/examples/wifi/simple_sniffer/main/simple_sniffer_example_main.c index 013ed6d10c..1b664b0396 100644 --- a/examples/wifi/simple_sniffer/main/simple_sniffer_example_main.c +++ b/examples/wifi/simple_sniffer/main/simple_sniffer_example_main.c @@ -27,14 +27,14 @@ #include "cmd_decl.h" #include "sdkconfig.h" -#if CONFIG_STORE_HISTORY +#if CONFIG_SNIFFER_STORE_HISTORY #define HISTORY_MOUNT_POINT "/data" #define HISTORY_FILE_PATH HISTORY_MOUNT_POINT "/history.txt" #endif static const char *TAG = "example"; -#if CONFIG_STORE_HISTORY +#if CONFIG_SNIFFER_STORE_HISTORY /* Initialize filesystem for command history store */ static void initialize_filesystem() { @@ -113,7 +113,7 @@ static void initialize_console() /* Set command history size */ linenoiseHistorySetMaxLen(100); -#if CONFIG_STORE_HISTORY +#if CONFIG_SNIFFER_STORE_HISTORY /* Load command history from filesystem */ linenoiseHistoryLoad(HISTORY_FILE_PATH); #endif @@ -223,7 +223,7 @@ void app_main(void) { initialize_nvs(); -#if CONFIG_STORE_HISTORY +#if CONFIG_SNIFFER_STORE_HISTORY initialize_filesystem(); #endif @@ -286,7 +286,7 @@ void app_main(void) /* Add the command to the history */ linenoiseHistoryAdd(line); -#if CONFIG_STORE_HISTORY +#if CONFIG_SNIFFER_STORE_HISTORY /* Save command history to filesystem */ linenoiseHistorySave(HISTORY_FILE_PATH); #endif diff --git a/examples/wifi/wpa2_enterprise/main/Kconfig.projbuild b/examples/wifi/wpa2_enterprise/main/Kconfig.projbuild index 7cf61fbcc6..68f6504736 100644 --- a/examples/wifi/wpa2_enterprise/main/Kconfig.projbuild +++ b/examples/wifi/wpa2_enterprise/main/Kconfig.projbuild @@ -1,34 +1,34 @@ menu "Example Configuration" - config WIFI_SSID + config EXAMPLE_WIFI_SSID string "WiFi SSID" default "wpa2_test" help SSID (network name) for the example to connect to. - config EAP_METHOD + config EXAMPLE_EAP_METHOD int "EAP METHOD" default 1 help EAP method (TLS, PEAP or TTLS) for the example to use. TLS: 0, PEAP: 1, TTLS: 2 - config EAP_ID + config EXAMPLE_EAP_ID string "EAP ID" default "example@espressif.com" help Identity in phase 1 of EAP procedure. - config EAP_USERNAME + config EXAMPLE_EAP_USERNAME string "EAP USERNAME" default "espressif" help Username for EAP method (PEAP and TTLS). - config EAP_PASSWORD + config EXAMPLE_EAP_PASSWORD string "EAP PASSWORD" default "test11" help Password for EAP method (PEAP and TTLS). -endmenu \ No newline at end of file +endmenu diff --git a/examples/wifi/wpa2_enterprise/main/wpa2_enterprise_main.c b/examples/wifi/wpa2_enterprise/main/wpa2_enterprise_main.c index 64e8b40de1..1917c1eb5a 100644 --- a/examples/wifi/wpa2_enterprise/main/wpa2_enterprise_main.c +++ b/examples/wifi/wpa2_enterprise/main/wpa2_enterprise_main.c @@ -38,12 +38,12 @@ You can choose EAP method via 'make menuconfig' according to the configuration of AP. */ -#define EXAMPLE_WIFI_SSID CONFIG_WIFI_SSID -#define EXAMPLE_EAP_METHOD CONFIG_EAP_METHOD +#define EXAMPLE_WIFI_SSID CONFIG_EXAMPLE_WIFI_SSID +#define EXAMPLE_EAP_METHOD CONFIG_EXAMPLE_EAP_METHOD -#define EXAMPLE_EAP_ID CONFIG_EAP_ID -#define EXAMPLE_EAP_USERNAME CONFIG_EAP_USERNAME -#define EXAMPLE_EAP_PASSWORD CONFIG_EAP_PASSWORD +#define EXAMPLE_EAP_ID CONFIG_EXAMPLE_EAP_ID +#define EXAMPLE_EAP_USERNAME CONFIG_EXAMPLE_EAP_USERNAME +#define EXAMPLE_EAP_PASSWORD CONFIG_EXAMPLE_EAP_PASSWORD /* FreeRTOS event group to signal when we are connected & ready to make a request */ static EventGroupHandle_t wifi_event_group;