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.
This commit is contained in:
Ivan Grokhotkov
2017-01-19 10:58:09 +08:00
parent 9a8a82e857
commit b1df4c47f9

View File

@@ -540,7 +540,7 @@ config ESP32_PHY_INIT_DATA_IN_PARTITION
If unsure, choose 'n'. If unsure, choose 'n'.
config ESP32_PHY_MAX_TX_POWER config ESP32_PHY_MAX_WIFI_TX_POWER
int "Max WiFi TX power (dBm)" int "Max WiFi TX power (dBm)"
range 0 20 range 0 20
default 20 default 20
@@ -549,4 +549,10 @@ config ESP32_PHY_MAX_TX_POWER
Set maximum transmit power for WiFi radio. Actual transmit power for high Set maximum transmit power for WiFi radio. Actual transmit power for high
data rates may be lower than this setting. 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 endmenu