From b1df4c47f98e0b5082146543e362c8e849be9d22 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Thu, 19 Jan 2017 10:58:09 +0800 Subject: [PATCH] kconfig: define ESP32_PHY_MAX_TX_POWER if PHY_ENABLED ESP32_PHY_MAX_TX_POWER option is only meaningful for WiFi, so previous change made it depend on WIFI_ENABLED. However if WiFi is not enabled, but BT is, this option becomes undefined which breaks phy_init_data generation. This change turns ESP32_PHY_MAX_TX_POWER into a hidden parameter, which depends on PHY_ENABLED. New user-visible parameter, ESP32_PHY_MAX_WIFI_TX_POWER is introduced which depends on WIFI_ENABLED and is used as default value for ESP32_PHY_MAX_TX_POWER if WIFI_ENABLED is set. Otherwise ESP32_PHY_MAX_WIFI_TX_POWER is set to 20. --- components/esp32/Kconfig | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/components/esp32/Kconfig b/components/esp32/Kconfig index 5db28b6bea..c6e4cc7e22 100644 --- a/components/esp32/Kconfig +++ b/components/esp32/Kconfig @@ -539,8 +539,8 @@ config ESP32_PHY_INIT_DATA_IN_PARTITION into the application binary. If unsure, choose 'n'. - -config ESP32_PHY_MAX_TX_POWER + +config ESP32_PHY_MAX_WIFI_TX_POWER int "Max WiFi TX power (dBm)" range 0 20 default 20 @@ -548,5 +548,11 @@ config ESP32_PHY_MAX_TX_POWER help Set maximum transmit power for WiFi radio. Actual transmit power for high data rates may be lower than this setting. - + +config ESP32_PHY_MAX_TX_POWER + int + depends on PHY_ENABLED + default 20 if !WIFI_ENABLED + default ESP32_PHY_MAX_WIFI_TX_POWER if WIFI_ENABLED + endmenu