summaryrefslogtreecommitdiff
path: root/docs/library
diff options
context:
space:
mode:
authorglenn20 <glenn.moloney@gmail.com>2022-08-25 16:55:57 +1000
committerDamien George <damien@micropython.org>2023-05-06 13:51:00 +1000
commit1093dea70924a785543326773319dbb156e05c15 (patch)
tree248d7c86f3ce26e3d9254f7f9d464465a3cef994 /docs/library
parent786013d467d8beace7c7a8a2cd1122c799d05dae (diff)
esp32,esp8266: Add support to set/get power saving mode of WLAN.
For esp32 and esp8266 this commit adds: - a 'pm' option to WLAN.config() to set/get the wifi power saving mode; and - PM_NONE, PM_PERFORMANCE and PM_POWERSAVE constants to the WLAN class. This API should be general enough to use with all WLAN drivers. Documentation is also added.
Diffstat (limited to 'docs/library')
-rw-r--r--docs/library/network.WLAN.rst16
1 files changed, 16 insertions, 0 deletions
diff --git a/docs/library/network.WLAN.rst b/docs/library/network.WLAN.rst
index d1e620ef0..68cd49769 100644
--- a/docs/library/network.WLAN.rst
+++ b/docs/library/network.WLAN.rst
@@ -133,4 +133,20 @@ Methods
hostname The hostname that will be sent to DHCP (STA interfaces) and mDNS (if supported, both STA and AP). (Deprecated, use :func:`network.hostname` instead)
reconnects Number of reconnect attempts to make (integer, 0=none, -1=unlimited)
txpower Maximum transmit power in dBm (integer or float)
+ pm WiFi Power Management setting (see below for allowed values)
============= ===========
+
+Constants
+---------
+
+.. data:: WLAN.PM_PERFORMANCE
+ WLAN.PM_POWERSAVE
+ WLAN.PM_NONE
+
+ Allowed values for the ``WLAN.config(pm=...)`` network interface parameter:
+
+ * ``PM_PERFORMANCE``: enable WiFi power management to balance power
+ savings and WiFi performance
+ * ``PM_POWERSAVE``: enable WiFi power management with additional power
+ savings and reduced WiFi performance
+ * ``PM_NONE``: disable wifi power management