Skip to content

Commit 0359f33

Browse files
marcelstoerChristian Krämer
authored andcommitted
Add missing admonitions (nodemcu#2107)
Amends nodemcu#2064
1 parent 866f8d8 commit 0359f33

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

docs/en/modules/node.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,9 @@ Put NodeMCU in light sleep mode to reduce current consumption.
335335
* All active timers will be suspended and then resumed when NodeMCU wakes from sleep.
336336
* Any previously suspended timers will be resumed when NodeMCU wakes from sleep.
337337

338+
!!! attention
339+
This is disabled by default. Modify `PMSLEEP_ENABLE` in `app/include/user_config.h` to enable it.
340+
338341
#### Syntax
339342
`node.sleep({wake_gpio[, duration, int_type, resume_cb, preserve_mode]})`
340343

docs/en/modules/tmr.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,9 @@ if not mytimer:stop() then print("timer not stopped, not registered?") end
340340

341341
Suspend an armed timer.
342342

343+
!!! attention
344+
This is disabled by default. Modify `ENABLE_TIMER_SUSPEND` in `app/include/user_config.h` to enable it.
345+
343346
* Timers can be suspended at any time after they are armed.
344347
* If a timer is rearmed with `tmr.start` or `tmr.alarm` any matching suspended timers will be discarded.
345348

@@ -371,11 +374,13 @@ tmr.suspend(mytimer)
371374

372375
Suspend all currently armed timers.
373376

377+
!!! attention
378+
This is disabled by default. Modify `ENABLE_TIMER_SUSPEND` in `app/include/user_config.h` to enable it.
379+
374380
!!! Warning
375381
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.
376382
USE THIS FUNCTION AT YOUR OWN RISK!
377383

378-
379384
#### Syntax
380385
`tmr.suspend_all()`
381386

docs/en/modules/wifi.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@ Configures whether or not WiFi automatically goes to sleep in NULL_MODE. Enabled
102102

103103
Wake up WiFi from suspended state or cancel pending wifi suspension.
104104

105+
!!! attention
106+
This is disabled by default. Modify `PMSLEEP_ENABLE` in `app/include/user_config.h` to enable it.
107+
105108
!!! note
106109
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.
107110

@@ -263,6 +266,9 @@ none
263266
## wifi.suspend()
264267
Suspend Wifi to reduce current consumption.
265268

269+
!!! attention
270+
This is disabled by default. Modify `PMSLEEP_ENABLE` in `app/include/user_config.h` to enable it.
271+
266272
!!! note
267273
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.
268274

0 commit comments

Comments
 (0)