]> granicus.if.org Git - esp-idf/commitdiff
Rename Kconfig options (components/esp_wifi)
authorRoland Dobai <dobai.roland@gmail.com>
Mon, 29 Apr 2019 13:55:35 +0000 (15:55 +0200)
committerRoland Dobai <dobai.roland@gmail.com>
Tue, 21 May 2019 07:09:01 +0000 (09:09 +0200)
components/esp32/cpu_start.c
components/esp32/esp_adapter.c
components/esp_wifi/Kconfig
components/esp_wifi/sdkconfig.rename [new file with mode: 0644]
components/esp_wifi/src/phy_init.c

index ed701a1a7352ea295ded8ddf8b2feaa73e03120f..dc9f10b212d11aee306d3d7fa0c7c77ab074f69b 100644 (file)
@@ -411,7 +411,7 @@ void start_cpu0_default(void)
     }
 #endif
 
-#if CONFIG_SW_COEXIST_ENABLE
+#if CONFIG_ESP32_WIFI_SW_COEXIST_ENABLE
     esp_coex_adapter_register(&g_coex_adapter_funcs);
 #endif
 
index 1dfcb342ce92c4375997d18b367a4aabcfbaec33..3893c28dc146e191cccb984dd1a6d953e6bf445a 100644 (file)
@@ -396,7 +396,7 @@ static void sc_ack_send_wrapper(void *param)
 
 static uint32_t coex_status_get_wrapper(void)
 {
-#if CONFIG_SW_COEXIST_ENABLE
+#if CONFIG_ESP32_WIFI_SW_COEXIST_ENABLE
     return coex_status_get();
 #else
     return 0;
@@ -405,7 +405,7 @@ static uint32_t coex_status_get_wrapper(void)
 
 static int coex_wifi_request_wrapper(uint32_t event, uint32_t latency, uint32_t duration)
 {
-#if CONFIG_SW_COEXIST_ENABLE
+#if CONFIG_ESP32_WIFI_SW_COEXIST_ENABLE
     return coex_wifi_request(event, latency, duration);
 #else
     return 0;
@@ -414,7 +414,7 @@ static int coex_wifi_request_wrapper(uint32_t event, uint32_t latency, uint32_t
 
 static int coex_wifi_release_wrapper(uint32_t event)
 {
-#if CONFIG_SW_COEXIST_ENABLE
+#if CONFIG_ESP32_WIFI_SW_COEXIST_ENABLE
     return coex_wifi_release(event);
 #else
     return 0;
@@ -423,7 +423,7 @@ static int coex_wifi_release_wrapper(uint32_t event)
 
 int IRAM_ATTR coex_bt_request_wrapper(uint32_t event, uint32_t latency, uint32_t duration)
 {
-#if CONFIG_SW_COEXIST_ENABLE
+#if CONFIG_ESP32_WIFI_SW_COEXIST_ENABLE
     return coex_bt_request(event, latency, duration);
 #else
     return 0;
@@ -432,7 +432,7 @@ int IRAM_ATTR coex_bt_request_wrapper(uint32_t event, uint32_t latency, uint32_t
 
 int IRAM_ATTR coex_bt_release_wrapper(uint32_t event)
 {
-#if CONFIG_SW_COEXIST_ENABLE
+#if CONFIG_ESP32_WIFI_SW_COEXIST_ENABLE
     return coex_bt_release(event);
 #else
     return 0;
@@ -441,7 +441,7 @@ int IRAM_ATTR coex_bt_release_wrapper(uint32_t event)
 
 int coex_register_bt_cb_wrapper(coex_func_cb_t cb)
 {
-#if CONFIG_SW_COEXIST_ENABLE
+#if CONFIG_ESP32_WIFI_SW_COEXIST_ENABLE
     return coex_register_bt_cb(cb);
 #else
     return 0;
@@ -450,7 +450,7 @@ int coex_register_bt_cb_wrapper(coex_func_cb_t cb)
 
 uint32_t IRAM_ATTR coex_bb_reset_lock_wrapper(void)
 {
-#if CONFIG_SW_COEXIST_ENABLE
+#if CONFIG_ESP32_WIFI_SW_COEXIST_ENABLE
     return coex_bb_reset_lock();
 #else
     return 0;
@@ -459,7 +459,7 @@ uint32_t IRAM_ATTR coex_bb_reset_lock_wrapper(void)
 
 void IRAM_ATTR coex_bb_reset_unlock_wrapper(uint32_t restore)
 {
-#if CONFIG_SW_COEXIST_ENABLE
+#if CONFIG_ESP32_WIFI_SW_COEXIST_ENABLE
     coex_bb_reset_unlock(restore);
 #endif
 }
index cea9d63b0773aa59496d92b8ae8cf24464cb2be5..6aacbbcddb795265570f3288bade33b83832f043 100644 (file)
@@ -1,7 +1,7 @@
 
 menu Wi-Fi
 
-    config SW_COEXIST_ENABLE
+    config ESP32_WIFI_SW_COEXIST_ENABLE
         bool "Software controls WiFi/Bluetooth coexistence"
         depends on BT_ENABLED
         default y
@@ -12,10 +12,10 @@ menu Wi-Fi
             If only Bluetooth is used, it is recommended to disable this option to reduce binary file
             size.
 
-    choice SW_COEXIST_PREFERENCE
+    choice ESP32_WIFI_SW_COEXIST_PREFERENCE
         prompt "WiFi/Bluetooth coexistence performance preference"
-        depends on SW_COEXIST_ENABLE
-        default SW_COEXIST_PREFERENCE_BALANCE
+        depends on ESP32_WIFI_SW_COEXIST_ENABLE
+        default ESP32_WIFI_SW_COEXIST_PREFERENCE_BALANCE
         help
             Choose Bluetooth/WiFi/Balance for different preference.
             If choose WiFi, it will make WiFi performance better. Such, keep WiFi Audio more fluent.
@@ -25,23 +25,23 @@ menu Wi-Fi
             choose balance, the A2DP audio can play fluently, too.
             Except config preference in menuconfig, you can also call esp_coex_preference_set() dynamically.
 
-        config SW_COEXIST_PREFERENCE_WIFI
+        config ESP32_WIFI_SW_COEXIST_PREFERENCE_WIFI
             bool "WiFi"
 
-        config SW_COEXIST_PREFERENCE_BT
+        config ESP32_WIFI_SW_COEXIST_PREFERENCE_BT
             bool "Bluetooth(include BR/EDR and BLE)"
 
-        config SW_COEXIST_PREFERENCE_BALANCE
+        config ESP32_WIFI_SW_COEXIST_PREFERENCE_BALANCE
             bool "Balance"
 
     endchoice
 
-    config SW_COEXIST_PREFERENCE_VALUE
+    config ESP32_WIFI_SW_COEXIST_PREFERENCE_VALUE
         int
-        depends on SW_COEXIST_ENABLE
-        default 0 if SW_COEXIST_PREFERENCE_WIFI
-        default 1 if SW_COEXIST_PREFERENCE_BT
-        default 2 if SW_COEXIST_PREFERENCE_BALANCE
+        depends on ESP32_WIFI_SW_COEXIST_ENABLE
+        default 0 if ESP32_WIFI_SW_COEXIST_PREFERENCE_WIFI
+        default 1 if ESP32_WIFI_SW_COEXIST_PREFERENCE_BT
+        default 2 if ESP32_WIFI_SW_COEXIST_PREFERENCE_BALANCE
 
     config ESP32_WIFI_STATIC_RX_BUFFER_NUM
         int "Max number of WiFi static RX buffers"
diff --git a/components/esp_wifi/sdkconfig.rename b/components/esp_wifi/sdkconfig.rename
new file mode 100644 (file)
index 0000000..a9de8bd
--- /dev/null
@@ -0,0 +1,9 @@
+# sdkconfig replacement configurations for deprecated options formatted as
+# CONFIG_DEPRECATED_OPTION CONFIG_NEW_OPTION
+
+CONFIG_SW_COEXIST_ENABLE                CONFIG_ESP32_WIFI_SW_COEXIST_ENABLE
+CONFIG_SW_COEXIST_PREFERENCE            CONFIG_ESP32_WIFI_SW_COEXIST_PREFERENCE
+CONFIG_SW_COEXIST_PREFERENCE_WIFI       CONFIG_ESP32_WIFI_SW_COEXIST_PREFERENCE_WIFI
+CONFIG_SW_COEXIST_PREFERENCE_BT         CONFIG_ESP32_WIFI_SW_COEXIST_PREFERENCE_BT
+CONFIG_SW_COEXIST_PREFERENCE_BALANCE    CONFIG_ESP32_WIFI_SW_COEXIST_PREFERENCE_BALANCE
+CONFIG_SW_COEXIST_PREFERENCE_VALUE      CONFIG_ESP32_WIFI_SW_COEXIST_PREFERENCE_VALUE
index 2fade4e35ce3033a0d61da04991ae8f27afee4e4..ba1f76745de5b7da35cf739d6c586c4af9a37e51 100644 (file)
@@ -165,12 +165,12 @@ esp_err_t esp_phy_rf_init(const esp_phy_init_data_t* init_data, esp_phy_calibrat
         }
     }
 
-#if CONFIG_SW_COEXIST_ENABLE
+#if CONFIG_ESP32_WIFI_SW_COEXIST_ENABLE
     if ((module == PHY_BT_MODULE) || (module == PHY_WIFI_MODULE)){
         uint32_t phy_bt_wifi_mask = BIT(PHY_BT_MODULE) | BIT(PHY_WIFI_MODULE);
         if ((s_module_phy_rf_init & phy_bt_wifi_mask) == phy_bt_wifi_mask) { //both wifi & bt enabled
             coex_init();
-            coex_preference_set(CONFIG_SW_COEXIST_PREFERENCE_VALUE);
+            coex_preference_set(CONFIG_ESP32_WIFI_SW_COEXIST_PREFERENCE_VALUE);
             coex_resume();
         }
     }
@@ -197,7 +197,7 @@ esp_err_t esp_phy_rf_deinit(phy_rf_module_t module)
     s_module_phy_rf_init &= ~BIT(module);
     esp_err_t status = ESP_OK;
 
-#if CONFIG_SW_COEXIST_ENABLE
+#if CONFIG_ESP32_WIFI_SW_COEXIST_ENABLE
     if ((module == PHY_BT_MODULE) || (module == PHY_WIFI_MODULE)){
         if (is_both_wifi_bt_enabled == true) {
             coex_deinit();
@@ -246,7 +246,7 @@ esp_err_t esp_phy_rf_deinit(phy_rf_module_t module)
 
 esp_err_t esp_modem_sleep_enter(modem_sleep_module_t module)
 {
-#if CONFIG_SW_COEXIST_ENABLE
+#if CONFIG_ESP32_WIFI_SW_COEXIST_ENABLE
     uint32_t phy_bt_wifi_mask = BIT(PHY_BT_MODULE) | BIT(PHY_WIFI_MODULE);
 #endif
 
@@ -262,7 +262,7 @@ esp_err_t esp_modem_sleep_enter(modem_sleep_module_t module)
     else {
         _lock_acquire(&s_modem_sleep_lock);
         s_modem_sleep_module_enter |= BIT(module);
-#if CONFIG_SW_COEXIST_ENABLE
+#if CONFIG_ESP32_WIFI_SW_COEXIST_ENABLE
         _lock_acquire(&s_phy_rf_init_lock);
         if (((s_module_phy_rf_init & phy_bt_wifi_mask) == phy_bt_wifi_mask)  //both wifi & bt enabled
                 && (s_modem_sleep_module_enter & (MODEM_BT_MASK | MODEM_WIFI_MASK)) != 0){
@@ -283,7 +283,7 @@ esp_err_t esp_modem_sleep_enter(modem_sleep_module_t module)
 
 esp_err_t esp_modem_sleep_exit(modem_sleep_module_t module)
 {
-#if CONFIG_SW_COEXIST_ENABLE
+#if CONFIG_ESP32_WIFI_SW_COEXIST_ENABLE
     uint32_t phy_bt_wifi_mask = BIT(PHY_BT_MODULE) | BIT(PHY_WIFI_MODULE);
 #endif
 
@@ -305,7 +305,7 @@ esp_err_t esp_modem_sleep_exit(modem_sleep_module_t module)
                 s_is_modem_sleep_en = false;
             }
         }
-#if CONFIG_SW_COEXIST_ENABLE
+#if CONFIG_ESP32_WIFI_SW_COEXIST_ENABLE
         _lock_acquire(&s_phy_rf_init_lock);
         if (((s_module_phy_rf_init & phy_bt_wifi_mask) == phy_bt_wifi_mask)  //both wifi & bt enabled
                 && (s_modem_sleep_module_enter & (MODEM_BT_MASK | MODEM_WIFI_MASK)) == 0){