esp-idf/examples/wifi/power_save/main/Kconfig.projbuild
2024-09-19 20:04:44 +08:00

149 lines
5.7 KiB
Plaintext

menu "Example Configuration"
config EXAMPLE_GET_AP_INFO_FROM_STDIN
bool "Get AP info from console"
default n
help
If enabled, the example will prompt the user to enter the SSID and Password of the AP to be connected
via the console.
config EXAMPLE_WIFI_SSID
string "WiFi SSID"
default "myssid"
depends on !EXAMPLE_GET_AP_INFO_FROM_STDIN
help
SSID (network name) for the example to connect to.
config EXAMPLE_WIFI_PASSWORD
string "WiFi Password"
default "mypassword"
depends on !EXAMPLE_GET_AP_INFO_FROM_STDIN
help
WiFi password (WPA or WPA2) for the example to use.
config EXAMPLE_WIFI_LISTEN_INTERVAL
int "WiFi listen interval"
default 3
help
Interval for station to listen to beacon from AP. The unit of listen interval is one beacon interval.
For example, if beacon interval is 100 ms and listen interval is 3, the interval for station to listen
to beacon is 300 ms.
config EXAMPLE_WIFI_BEACON_TIMEOUT
int "WiFi beacon timeout"
default 6
range 6 30
help
For Station, If the station does not receive a beacon frame from the connected SoftAP during the
inactive time, disconnect from SoftAP. Default 6s.
choice EXAMPLE_WIFI_BAND_MODE
prompt "wifi band"
default EXAMPLE_WIFI_BAND_MODE_2G
depends on SOC_WIFI_HE_SUPPORT_5G
help
WiFi band for the example to use.
config EXAMPLE_WIFI_BAND_MODE_2G
bool "2G"
config EXAMPLE_WIFI_BAND_MODE_5G
bool "5G"
config EXAMPLE_WIFI_BAND_MODE_AUTO
bool "Auto"
endchoice
choice EXAMPLE_POWER_SAVE_MODE
prompt "power save mode"
default EXAMPLE_POWER_SAVE_MIN_MODEM
help
Power save mode for the esp32 to use. Modem sleep mode includes minimum and maximum power save modes.
In minimum power save mode, station wakes up every DTIM to receive beacon. Broadcast data will not be
lost because it is transmitted after DTIM. However, it can not save much more power if DTIM is short
for DTIM is determined by AP.
In maximum power save mode, station wakes up every listen interval to receive beacon. Broadcast data
may be lost because station may be in sleep state at DTIM time. If listen interval is longer, more power
is saved but broadcast data is more easy to lose.
config EXAMPLE_POWER_SAVE_NONE
bool "none"
config EXAMPLE_POWER_SAVE_MIN_MODEM
bool "minimum modem"
config EXAMPLE_POWER_SAVE_MAX_MODEM
bool "maximum modem"
endchoice
choice EXAMPLE_MAX_CPU_FREQ
prompt "Maximum CPU frequency"
default EXAMPLE_MAX_CPU_FREQ_80
depends on PM_ENABLE
help
Maximum CPU frequency to use for dynamic frequency scaling.
config EXAMPLE_MAX_CPU_FREQ_80
bool "80 MHz"
config EXAMPLE_MAX_CPU_FREQ_120
bool "120 MHz"
depends on IDF_TARGET_ESP32C2
config EXAMPLE_MAX_CPU_FREQ_160
bool "160 MHz"
depends on !IDF_TARGET_ESP32C2
config EXAMPLE_MAX_CPU_FREQ_240
bool "240 MHz"
depends on IDF_TARGET_ESP32 || IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3 || IDF_TARGET_ESP32C5
endchoice
config EXAMPLE_MAX_CPU_FREQ_MHZ
int
default 80 if EXAMPLE_MAX_CPU_FREQ_80
default 120 if EXAMPLE_MAX_CPU_FREQ_120
default 160 if EXAMPLE_MAX_CPU_FREQ_160
default 240 if EXAMPLE_MAX_CPU_FREQ_240
choice EXAMPLE_MIN_CPU_FREQ
prompt "Minimum CPU frequency"
default EXAMPLE_MIN_CPU_FREQ_48M if IDF_TARGET_ESP32C5
default EXAMPLE_MIN_CPU_FREQ_10M
depends on PM_ENABLE
help
Minimum CPU frequency to use for dynamic frequency scaling.
Should be set to XTAL frequency or XTAL frequency divided by integer.
config EXAMPLE_MIN_CPU_FREQ_48M
bool "48 MHz (use with 48MHz XTAL)"
depends on XTAL_FREQ_48 || (XTAL_FREQ_AUTO && IDF_TARGET_ESP32C5)
config EXAMPLE_MIN_CPU_FREQ_40M
bool "40 MHz (use with 40MHz XTAL)"
depends on XTAL_FREQ_40 || XTAL_FREQ_AUTO
config EXAMPLE_MIN_CPU_FREQ_24M
bool "24 MHz (use with 48MHz XTAL)"
depends on XTAL_FREQ_48 || (XTAL_FREQ_AUTO && IDF_TARGET_ESP32C5)
config EXAMPLE_MIN_CPU_FREQ_20M
bool "20 MHz (use with 40MHz XTAL)"
depends on XTAL_FREQ_40 || XTAL_FREQ_AUTO
config EXAMPLE_MIN_CPU_FREQ_12M
bool "12 MHz (use with 48MHz XTAL)"
depends on XTAL_FREQ_48 || (XTAL_FREQ_AUTO && IDF_TARGET_ESP32C5)
config EXAMPLE_MIN_CPU_FREQ_10M
bool "10 MHz (use with 40MHz XTAL)"
depends on XTAL_FREQ_40 || XTAL_FREQ_AUTO
config EXAMPLE_MIN_CPU_FREQ_26M
bool "26 MHz (use with 26MHz XTAL)"
depends on XTAL_FREQ_26 || (XTAL_FREQ_AUTO && IDF_TARGET_ESP32C2)
config EXAMPLE_MIN_CPU_FREQ_13M
bool "13 MHz (use with 26MHz XTAL)"
depends on XTAL_FREQ_26 || (XTAL_FREQ_AUTO && IDF_TARGET_ESP32C2)
endchoice
config EXAMPLE_MIN_CPU_FREQ_MHZ
int
default 48 if EXAMPLE_MIN_CPU_FREQ_48M
default 40 if EXAMPLE_MIN_CPU_FREQ_40M
default 24 if EXAMPLE_MIN_CPU_FREQ_24M
default 20 if EXAMPLE_MIN_CPU_FREQ_20M
default 12 if EXAMPLE_MIN_CPU_FREQ_12M
default 10 if EXAMPLE_MIN_CPU_FREQ_10M
default 26 if EXAMPLE_MIN_CPU_FREQ_26M
default 13 if EXAMPLE_MIN_CPU_FREQ_13M
endmenu