Rename Kconfig options (components/esp_wifi)

This commit is contained in:
Roland Dobai
2019-04-29 15:55:35 +02:00
parent 92950db44e
commit b8111ab1d5
5 changed files with 37 additions and 28 deletions

View File

@@ -411,7 +411,7 @@ void start_cpu0_default(void)
} }
#endif #endif
#if CONFIG_SW_COEXIST_ENABLE #if CONFIG_ESP32_WIFI_SW_COEXIST_ENABLE
esp_coex_adapter_register(&g_coex_adapter_funcs); esp_coex_adapter_register(&g_coex_adapter_funcs);
#endif #endif

View File

@@ -396,7 +396,7 @@ static void sc_ack_send_wrapper(void *param)
static uint32_t coex_status_get_wrapper(void) static uint32_t coex_status_get_wrapper(void)
{ {
#if CONFIG_SW_COEXIST_ENABLE #if CONFIG_ESP32_WIFI_SW_COEXIST_ENABLE
return coex_status_get(); return coex_status_get();
#else #else
return 0; 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) 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); return coex_wifi_request(event, latency, duration);
#else #else
return 0; 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) 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); return coex_wifi_release(event);
#else #else
return 0; 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) 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); return coex_bt_request(event, latency, duration);
#else #else
return 0; 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) 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); return coex_bt_release(event);
#else #else
return 0; 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) 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); return coex_register_bt_cb(cb);
#else #else
return 0; 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) 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(); return coex_bb_reset_lock();
#else #else
return 0; 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) 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); coex_bb_reset_unlock(restore);
#endif #endif
} }

View File

@@ -1,7 +1,7 @@
menu Wi-Fi menu Wi-Fi
config SW_COEXIST_ENABLE config ESP32_WIFI_SW_COEXIST_ENABLE
bool "Software controls WiFi/Bluetooth coexistence" bool "Software controls WiFi/Bluetooth coexistence"
depends on BT_ENABLED depends on BT_ENABLED
default y 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 If only Bluetooth is used, it is recommended to disable this option to reduce binary file
size. size.
choice SW_COEXIST_PREFERENCE choice ESP32_WIFI_SW_COEXIST_PREFERENCE
prompt "WiFi/Bluetooth coexistence performance preference" prompt "WiFi/Bluetooth coexistence performance preference"
depends on SW_COEXIST_ENABLE depends on ESP32_WIFI_SW_COEXIST_ENABLE
default SW_COEXIST_PREFERENCE_BALANCE default ESP32_WIFI_SW_COEXIST_PREFERENCE_BALANCE
help help
Choose Bluetooth/WiFi/Balance for different preference. Choose Bluetooth/WiFi/Balance for different preference.
If choose WiFi, it will make WiFi performance better. Such, keep WiFi Audio more fluent. 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. choose balance, the A2DP audio can play fluently, too.
Except config preference in menuconfig, you can also call esp_coex_preference_set() dynamically. 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" bool "WiFi"
config SW_COEXIST_PREFERENCE_BT config ESP32_WIFI_SW_COEXIST_PREFERENCE_BT
bool "Bluetooth(include BR/EDR and BLE)" bool "Bluetooth(include BR/EDR and BLE)"
config SW_COEXIST_PREFERENCE_BALANCE config ESP32_WIFI_SW_COEXIST_PREFERENCE_BALANCE
bool "Balance" bool "Balance"
endchoice endchoice
config SW_COEXIST_PREFERENCE_VALUE config ESP32_WIFI_SW_COEXIST_PREFERENCE_VALUE
int int
depends on SW_COEXIST_ENABLE depends on ESP32_WIFI_SW_COEXIST_ENABLE
default 0 if SW_COEXIST_PREFERENCE_WIFI default 0 if ESP32_WIFI_SW_COEXIST_PREFERENCE_WIFI
default 1 if SW_COEXIST_PREFERENCE_BT default 1 if ESP32_WIFI_SW_COEXIST_PREFERENCE_BT
default 2 if SW_COEXIST_PREFERENCE_BALANCE default 2 if ESP32_WIFI_SW_COEXIST_PREFERENCE_BALANCE
config ESP32_WIFI_STATIC_RX_BUFFER_NUM config ESP32_WIFI_STATIC_RX_BUFFER_NUM
int "Max number of WiFi static RX buffers" int "Max number of WiFi static RX buffers"

View File

@@ -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

View 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)){ if ((module == PHY_BT_MODULE) || (module == PHY_WIFI_MODULE)){
uint32_t phy_bt_wifi_mask = BIT(PHY_BT_MODULE) | BIT(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 if ((s_module_phy_rf_init & phy_bt_wifi_mask) == phy_bt_wifi_mask) { //both wifi & bt enabled
coex_init(); coex_init();
coex_preference_set(CONFIG_SW_COEXIST_PREFERENCE_VALUE); coex_preference_set(CONFIG_ESP32_WIFI_SW_COEXIST_PREFERENCE_VALUE);
coex_resume(); 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); s_module_phy_rf_init &= ~BIT(module);
esp_err_t status = ESP_OK; 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 ((module == PHY_BT_MODULE) || (module == PHY_WIFI_MODULE)){
if (is_both_wifi_bt_enabled == true) { if (is_both_wifi_bt_enabled == true) {
coex_deinit(); 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) 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); uint32_t phy_bt_wifi_mask = BIT(PHY_BT_MODULE) | BIT(PHY_WIFI_MODULE);
#endif #endif
@@ -262,7 +262,7 @@ esp_err_t esp_modem_sleep_enter(modem_sleep_module_t module)
else { else {
_lock_acquire(&s_modem_sleep_lock); _lock_acquire(&s_modem_sleep_lock);
s_modem_sleep_module_enter |= BIT(module); 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); _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 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){ && (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) 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); uint32_t phy_bt_wifi_mask = BIT(PHY_BT_MODULE) | BIT(PHY_WIFI_MODULE);
#endif #endif
@@ -305,7 +305,7 @@ esp_err_t esp_modem_sleep_exit(modem_sleep_module_t module)
s_is_modem_sleep_en = false; 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); _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 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){ && (s_modem_sleep_module_enter & (MODEM_BT_MASK | MODEM_WIFI_MASK)) == 0){