Skip to content

Commit d8a72d5

Browse files
committed
Update documentation
1 parent 29bd2fb commit d8a72d5

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

Diff for: docs/api.md

+27-27
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
Members | Descriptions
44
--------------------------------|---------------------------------------------
55
`class ` [`LowPowerPortentaH7`](#class_low_power_portenta_h7) | A class that provides low power functionality for the Portenta H7 board.
6-
`class ` [`LowPowerStandbyType`](#class_low_power_standby_type) | The [LowPowerStandbyType](#class_low_power_standby_type) class represents different types of standby modes for low power operation.
7-
`class ` [`RTCWakeupDelay`](#class_r_t_c_wakeup_delay) | The [RTCWakeupDelay](#class_r_t_c_wakeup_delay) class represents a delay before waking up from a low power mode.
6+
`class ` [`LowPowerStandbyType`](#class_low_power_standby_type) | The [LowPowerStandbyType](#class_low_power_standby_type) class represents different methods of wakeup.
7+
`class ` [`RTCWakeupDelay`](#class_r_t_c_wakeup_delay) | The [RTCWakeupDelay](#class_r_t_c_wakeup_delay) class represents a delay before waking up from Standby Mode.
88

99
# class `LowPowerPortentaH7` <a id="class_low_power_portenta_h7" class="anchor"></a>
1010

1111
A class that provides low power functionality for the Portenta H7 board.
1212

13-
The [LowPowerPortentaH7](#class_low_power_portenta_h7) class allows the microcontroller on the Portenta H7 board to enter low power modes such as Standby Mode and Deep Sleep Mode. It provides functions to check the current mode, prepare the option bytes for entering Standby Mode, and control the M4 and M7 cores independently. It also provides functions to measure the time since boot, time spent in idle, sleep, and deep sleep modes.
13+
The [LowPowerPortentaH7](#class_low_power_portenta_h7) class allows the microcontroller on the Portenta H7 board to enter low power modes such as Standby Mode and Deep Sleep Mode. It provides functions to check the mode before startup, prepare the option bytes for entering Standby Mode, and control the M4 and M7 cores independently. It also provides functions to measure the time since boot, time spent in Idle, Sleep, and Deep Sleep modes.
1414

1515
This class is a singleton and shall always be accessed through the global LowPower object.
1616

@@ -23,16 +23,16 @@ This class is specific to the Portenta H7 board.
2323
| [`allowDeepSleep`](#class_low_power_portenta_h7_1a7ed518f8205a0b7306d23b7e2a22e82b) | Make Deep Sleep possible in the default case. |
2424
| [`canDeepSleep`](#class_low_power_portenta_h7_1a07d9e0f356e40ac70655e279fbad87a9) | Check if Deep Sleep is possible or not at the moment. |
2525
| [`checkOptionBytes`](#class_low_power_portenta_h7_1a7519d3acf693f450af84312576d8e669) | Check if the option bytes are correct to enter Standby Mode. |
26-
| [`wasInCPUMode`](#class_low_power_portenta_h7_1ae2059eb4fb01a30342b9fb6918b6ab4c) | Checks if the microcontroller was in the given CPU mode before starting. Note: It's possible that the microcontroller was in more than one of these modes before starting. Call this function multiple times to check for each mode. Important: When you're done checking, call resetStandbyModeFlags() to reset the flags so they are reported correctly the next time the microcontroller starts. |
2726
| [`resetPreviousCPUModeFlags`](#class_low_power_portenta_h7_1a1753e3c053b2b64b59da3cbb9b921d76) | Reset the flags that are used to determine the microcontroller's previous CPU mode. This is necessary to get correct results from [wasInCPUMode()](#class_low_power_portenta_h7_1ae2059eb4fb01a30342b9fb6918b6ab4c). |
2827
| [`numberOfDeepSleepLocks`](#class_low_power_portenta_h7_1a9d2730d86abf42782261b0f03778c3bb) | Check how many Deep Sleep locks are held at the moment. |
2928
| [`prepareOptionBytes`](#class_low_power_portenta_h7_1abdc0ce13b68d3a2188702690997af2ae) | Prepare the option bytes for entry into Standby Mode. |
30-
| [`standbyM4`](#class_low_power_portenta_h7_1a9e07fd4f7895a7753e7e28f99aca1ace) | Make the M4 core enter Standby Mode. |
31-
| [`standbyM7`](#class_low_power_portenta_h7_1aa9c1cb86c832c35f6653a3d6c9f0d32f) | Make the M7 core enter Standby Mode. |
29+
| [`standbyM4`](#class_low_power_portenta_h7_1a9e07fd4f7895a7753e7e28f99aca1ace) | Make the M4 core and D2 domain enter standby mode. |
30+
| [`standbyM7`](#class_low_power_portenta_h7_1aa9c1cb86c832c35f6653a3d6c9f0d32f) | Make the M7 core and D1 domain enter standby mode, and make it possible for the D3 domain to do so too. |
3231
| [`timeSinceBoot`](#class_low_power_portenta_h7_1a4758c25574b6d099545ac8d55eff6f68) | Time since the board was booted. It reports the time since the last wake-up reset (after being in Standby Mode) or power-on depending on what happened last. |
33-
| [`timeSpentIdle`](#class_low_power_portenta_h7_1ad42fdfa6885d8e0fdca5aa012fdb4c60) | Time spent in idle. |
32+
| [`timeSpentIdle`](#class_low_power_portenta_h7_1ad42fdfa6885d8e0fdca5aa012fdb4c60) | Time spent in Idle Mode. |
3433
| [`timeSpentInSleep`](#class_low_power_portenta_h7_1a994eb6fcc0382515a82b81fa37ca9f3c) | Time spent in Sleep Mode. |
3534
| [`timeSpentInDeepSleep`](#class_low_power_portenta_h7_1a146eb61800a74360687fd34b456c0b44) | Time spent in Deep Sleep Mode. |
35+
| [`wasInCPUMode`](#class_low_power_portenta_h7_1ae2059eb4fb01a30342b9fb6918b6ab4c) | Checks if the microcontroller was in the given CPU mode before starting. Note: It's possible that the microcontroller was in more than one of these modes before starting. Call this function multiple times to check for each mode. Important: When you're done checking, call resetStandbyModeFlags() to reset the flags so they are reported correctly the next time the microcontroller starts. |
3636

3737
## Members
3838

@@ -70,20 +70,6 @@ Check if the option bytes are correct to enter Standby Mode.
7070
A constant from the LowPowerReturnCode enum.
7171
<hr />
7272

73-
### `wasInCPUMode` <a id="class_low_power_portenta_h7_1ae2059eb4fb01a30342b9fb6918b6ab4c" class="anchor"></a>
74-
75-
```cpp
76-
bool wasInCPUMode( CPUMode mode) const
77-
```
78-
79-
Checks if the microcontroller was in the given CPU mode before starting. Note: It's possible that the microcontroller was in more than one of these modes before starting. Call this function multiple times to check for each mode. Important: When you're done checking, call resetStandbyModeFlags() to reset the flags so they are reported correctly the next time the microcontroller starts.
80-
#### Parameters
81-
* `mode` The CPU mode to check.
82-
83-
#### Returns
84-
True if the microcontroller was in the given mode, false otherwise.
85-
<hr />
86-
8773
### `resetPreviousCPUModeFlags` <a id="class_low_power_portenta_h7_1a1753e3c053b2b64b59da3cbb9b921d76" class="anchor"></a>
8874

8975
```cpp
@@ -124,7 +110,7 @@ A constant from the LowPowerReturnCode enum.
124110
LowPowerReturnCode standbyM4() const
125111
```
126112

127-
Make the M4 core enter Standby Mode.
113+
Make the M4 core and D2 domain enter standby mode.
128114

129115
#### Returns
130116
A constant from the LowPowerReturnCode enum.
@@ -136,7 +122,7 @@ A constant from the LowPowerReturnCode enum.
136122
LowPowerReturnCode standbyM7(const T standbyType, const Args... args) const
137123
```
138124
139-
Make the M7 core enter Standby Mode.
125+
Make the M7 core and D1 domain enter standby mode, and make it possible for the D3 domain to do so too.
140126
141127
#### Parameters
142128
* `standbyType` One or a combination of [LowPowerStandbyType::untilPinActivity](#class_low_power_standby_type_1a4c5b50ac615cf60ff88dd3b9bb145fa9) and [LowPowerStandbyType::untilTimeElapsed](#class_low_power_standby_type_1aa4882e571c0e9444c5978c8520e8e90e). The combination is done with the | operator.
@@ -165,7 +151,7 @@ Number of microseconds.
165151
uint64_t timeSpentIdle() const
166152
```
167153

168-
Time spent in idle.
154+
Time spent in Idle Mode.
169155

170156
#### Returns
171157
Number of microseconds.
@@ -195,11 +181,25 @@ Time spent in Deep Sleep Mode.
195181
Number of microseconds.
196182
<hr />
197183

184+
### `wasInCPUMode` <a id="class_low_power_portenta_h7_1ae2059eb4fb01a30342b9fb6918b6ab4c" class="anchor"></a>
185+
186+
```cpp
187+
bool wasInCPUMode( CPUMode mode) const
188+
```
189+
190+
Checks if the microcontroller was in the given CPU mode before starting. Note: It's possible that the microcontroller was in more than one of these modes before starting. Call this function multiple times to check for each mode. Important: When you're done checking, call resetStandbyModeFlags() to reset the flags so they are reported correctly the next time the microcontroller starts.
191+
#### Parameters
192+
* `mode` The CPU mode to check.
193+
194+
#### Returns
195+
True if the microcontroller was in the given mode, false otherwise.
196+
<hr />
197+
198198
# class `LowPowerStandbyType` <a id="class_low_power_standby_type" class="anchor"></a>
199199
200-
The [LowPowerStandbyType](#class_low_power_standby_type) class represents different types of standby modes for low power operation.
200+
The [LowPowerStandbyType](#class_low_power_standby_type) class represents different methods of wakeup.
201201
202-
This class provides options for the following standby modes: waiting until pin activity or until a specified time has elapsed, or both. Those are represented by [LowPowerStandbyType::untilPinActivity](#class_low_power_standby_type_1a4c5b50ac615cf60ff88dd3b9bb145fa9) and [LowPowerStandbyType::untilTimeElapsed](#class_low_power_standby_type_1aa4882e571c0e9444c5978c8520e8e90e). To combine the two options use the | operator.
202+
This class provides options for the following methods of wakeup: waiting until pin activity or until a specified time has elapsed, or both. Those are represented by [LowPowerStandbyType::untilPinActivity](#class_low_power_standby_type_1a4c5b50ac615cf60ff88dd3b9bb145fa9) and [LowPowerStandbyType::untilTimeElapsed](#class_low_power_standby_type_1aa4882e571c0e9444c5978c8520e8e90e). To combine the two options use the | operator.
203203
204204
## Summary
205205
@@ -210,7 +210,7 @@ This class provides options for the following standby modes: waiting until pin a
210210
211211
# class `RTCWakeupDelay` <a id="class_r_t_c_wakeup_delay" class="anchor"></a>
212212
213-
The [RTCWakeupDelay](#class_r_t_c_wakeup_delay) class represents a delay before waking up from a low power mode.
213+
The [RTCWakeupDelay](#class_r_t_c_wakeup_delay) class represents a delay before waking up from Standby Mode.
214214
215215
## Summary
216216

0 commit comments

Comments
 (0)