You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Added message about potential for wifi crashes and more
Added message about potential for wifi crashes caused by long running
functions
Modified description for wifi.resume() and wifi.suspend()
The WiFi subsystem is maintained by background tasks that must run periodically. Any function or task that takes longer than 15ms (milliseconds) may cause the WiFi subsystem to crash. To avoid these potential crashes, it is advised that the WiFi subsystem be suspended with [wifi.suspend()](#wifisuspend) prior to the execution of any tasks or functions that exceed this 15ms guideline.
8
+
9
+
6
10
The NodeMCU WiFi control is spread across several tables:
7
11
8
12
-`wifi` for overall WiFi configuration
@@ -78,6 +82,10 @@ The current physical mode as one of `wifi.PHYMODE_B`, `wifi.PHYMODE_G` or `wifi.
78
82
79
83
Wake up WiFi from suspended state or cancel pending wifi suspension
80
84
85
+
!!! note
86
+
Wifi resume occurs asynchronously, this means that the resume request will only be processed when control of the processor is passed back to the SDK (after MyResumeFunction() has completed)
87
+
The resume callback also occurs asynchronously and will only execute after wifi has resumed normal operation.
88
+
81
89
#### Syntax
82
90
`wifi.resume([resume_cb])`
83
91
@@ -257,7 +265,10 @@ none
257
265
258
266
Suspend Wifi to reduce current consumption.
259
267
260
-
This function is also useful for preventing WiFi stack related crashes when executing functions or tasks that take longer than ~500ms
268
+
!!! note
269
+
Wifi suspension occurs asynchronously, this means that the suspend request will only be processed when control of the processor is passed back to the SDK (after MySuspendFunction() has completed)
270
+
The suspend callback also occurs asynchronously and will only execute after wifi has been successfully been suspended.
0 commit comments