Skip to content

Commit 31e0be2

Browse files
committed
Update outdated API
1 parent 24e4231 commit 31e0be2

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

Diff for: docs/README.md

+6-10
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ The Renesas and ST chips that are supported by this library have a slightly diff
223223
* **Effect**: Upon waking up from this mode, the execution of your program resumes exactly where it stopped. This is particularly useful for applications that require a quick resume with minimal power savings.
224224
* **Wake-Up Triggers**: Differ from board to board.
225225

226-
#### Deep Sleep
226+
#### Standby
227227
* **Function**: Significantly reduces power usage to approximately 100uA-300uA (when all peripherals are off), making it ideal for long-term, battery-dependent operations.
228228
* **Effect**: Unlike Sleep Mode, waking up from Deep Sleep Mode restarts the board, triggering the void setup() function. This behavior is suitable for scenarios where a full reset is acceptable or desired upon waking up.
229229
* **Wake-Up Triggers**: Both board can be configured to wake up either from an RTC alarm or an external interrupt pin.
@@ -260,7 +260,7 @@ To simplify things, we have added a convenience function in `Board` called `slee
260260

261261
##### Send the board to sleep
262262
* `board.sleepUntilwakeupEvent();` - Sends the board into the sleep state, where it consumes about ~6mA without peripherals and ~18mA with peripherals.
263-
* `board.deepSleepUntilwakeupEvent();` - Sends the board into the deep sleep state, where it consumes around ~100uA without peripherals and ~12mA with peripherals.
263+
* `board.standByUntilWakeupEvent();` - Sends the board into the deep sleep state, where it consumes around ~100uA without peripherals and ~12mA with peripherals.
264264

265265
##### Toggle peripherals
266266
* `board.turnPeripheralsOff();` - Turn the peripherals on Portenta C33 (ADC, RGB LED, Secure Element, Wifi and Bluetooth) off.
@@ -303,20 +303,16 @@ For those looking to fine-tune their board's energy efficiency by leveraging aut
303303

304304
This feature is particularly useful when you want to set the board to wake up at specific times. To make your board wake up on an RTC alarm you simply need to call `board.setWakeupRTC()` and it will enable that functionality.
305305

306-
To simplify things, we have added a convenience function in `Board` called `sleepFor`. This method takes a number of hours, minutes and seconds as a parameters. For more information, check out the [DeepSleep_WakeFromRTC_H7](https://github.com/arduino-libraries/Arduino_PowerManagement/blob/main/examples/DeepSleep_WakeFromRTC_H7/DeepSleep_WakeFromRTC_H7.ino) example.
306+
To simplify things, we have added a convenience function in `Board` called `sleepFor`. This method takes a number of hours, minutes and seconds as a parameters. For more information, check out the [Standby_WakeFromRTC_H7](../examples/Standby_WakeFromRTC_H7/Standby_WakeFromRTC_H7.ino) example.
307307

308308
```cpp
309-
PowerManagement manager;
310309
Board board;
311310

312311
void setup() {
313-
manager = PowerManagement();
314-
manager.begin();
315-
board = manager.getBoard();
316-
board.enableWakeupFromRTC();
317-
board.sleepFor(0, 0, 1);
312+
board.begin();
313+
board.enableWakeupFromRTC(0, 0, 1);
318314
board.setAllPeripheralsPower(false);
319-
board.deepSleepUntilWakeupEvent();
315+
board.standByUntilWakeupEvent();
320316
}
321317
```
322318

0 commit comments

Comments
 (0)