parent
aebfd1a907
commit
ded599f8ba
|
@ -335,6 +335,9 @@ Put NodeMCU in light sleep mode to reduce current consumption.
|
||||||
* All active timers will be suspended and then resumed when NodeMCU wakes from sleep.
|
* All active timers will be suspended and then resumed when NodeMCU wakes from sleep.
|
||||||
* Any previously suspended timers will be resumed when NodeMCU wakes from sleep.
|
* Any previously suspended timers will be resumed when NodeMCU wakes from sleep.
|
||||||
|
|
||||||
|
!!! attention
|
||||||
|
This is disabled by default. Modify `PMSLEEP_ENABLE` in `app/include/user_config.h` to enable it.
|
||||||
|
|
||||||
#### Syntax
|
#### Syntax
|
||||||
`node.sleep({wake_gpio[, duration, int_type, resume_cb, preserve_mode]})`
|
`node.sleep({wake_gpio[, duration, int_type, resume_cb, preserve_mode]})`
|
||||||
|
|
||||||
|
|
|
@ -340,6 +340,9 @@ if not mytimer:stop() then print("timer not stopped, not registered?") end
|
||||||
|
|
||||||
Suspend an armed timer.
|
Suspend an armed timer.
|
||||||
|
|
||||||
|
!!! attention
|
||||||
|
This is disabled by default. Modify `ENABLE_TIMER_SUSPEND` in `app/include/user_config.h` to enable it.
|
||||||
|
|
||||||
* Timers can be suspended at any time after they are armed.
|
* Timers can be suspended at any time after they are armed.
|
||||||
* If a timer is rearmed with `tmr.start` or `tmr.alarm` any matching suspended timers will be discarded.
|
* If a timer is rearmed with `tmr.start` or `tmr.alarm` any matching suspended timers will be discarded.
|
||||||
|
|
||||||
|
@ -371,11 +374,13 @@ tmr.suspend(mytimer)
|
||||||
|
|
||||||
Suspend all currently armed timers.
|
Suspend all currently armed timers.
|
||||||
|
|
||||||
|
!!! attention
|
||||||
|
This is disabled by default. Modify `ENABLE_TIMER_SUSPEND` in `app/include/user_config.h` to enable it.
|
||||||
|
|
||||||
!!! Warning
|
!!! Warning
|
||||||
This function suspends ALL active timers, including any active timers started by the NodeMCU subsystem or other modules. this may cause parts of your program to stop functioning properly.
|
This function suspends ALL active timers, including any active timers started by the NodeMCU subsystem or other modules. this may cause parts of your program to stop functioning properly.
|
||||||
USE THIS FUNCTION AT YOUR OWN RISK!
|
USE THIS FUNCTION AT YOUR OWN RISK!
|
||||||
|
|
||||||
|
|
||||||
#### Syntax
|
#### Syntax
|
||||||
`tmr.suspend_all()`
|
`tmr.suspend_all()`
|
||||||
|
|
||||||
|
|
|
@ -102,6 +102,9 @@ Configures whether or not WiFi automatically goes to sleep in NULL_MODE. Enabled
|
||||||
|
|
||||||
Wake up WiFi from suspended state or cancel pending wifi suspension.
|
Wake up WiFi from suspended state or cancel pending wifi suspension.
|
||||||
|
|
||||||
|
!!! attention
|
||||||
|
This is disabled by default. Modify `PMSLEEP_ENABLE` in `app/include/user_config.h` to enable it.
|
||||||
|
|
||||||
!!! note
|
!!! note
|
||||||
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). The resume callback also executes asynchronously and will only execute after wifi has resumed normal operation.
|
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). The resume callback also executes asynchronously and will only execute after wifi has resumed normal operation.
|
||||||
|
|
||||||
|
@ -263,6 +266,9 @@ none
|
||||||
## wifi.suspend()
|
## wifi.suspend()
|
||||||
Suspend Wifi to reduce current consumption.
|
Suspend Wifi to reduce current consumption.
|
||||||
|
|
||||||
|
!!! attention
|
||||||
|
This is disabled by default. Modify `PMSLEEP_ENABLE` in `app/include/user_config.h` to enable it.
|
||||||
|
|
||||||
!!! note
|
!!! note
|
||||||
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). The suspend callback also executes asynchronously and will only execute after wifi has been successfully been suspended.
|
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). The suspend callback also executes asynchronously and will only execute after wifi has been successfully been suspended.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue