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
#if CONFIG_SW_COEXIST_ENABLE
#if CONFIG_ESP32_WIFI_SW_COEXIST_ENABLE
esp_coex_adapter_register(&g_coex_adapter_funcs);
#endif

View 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
}

View 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"

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)){
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){