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
Copy file name to clipboardExpand all lines: docs/api.md
+20-7
Original file line number
Diff line number
Diff line change
@@ -23,12 +23,13 @@ This class is specific to the Portenta H7 board.
23
23
|[`allowDeepSleep`](#class_low_power_portenta_h7_1a7ed518f8205a0b7306d23b7e2a22e82b)| Make Deep Sleep possible in the default case. |
24
24
|[`canDeepSleep`](#class_low_power_portenta_h7_1a07d9e0f356e40ac70655e279fbad87a9)| Check if Deep Sleep is possible or not at the moment. |
25
25
|[`checkOptionBytes`](#class_low_power_portenta_h7_1a7519d3acf693f450af84312576d8e669)| Check if the option bytes are correct to enter Standby Mode. |
26
-
|[`previousCPUMode`](#class_low_power_portenta_h7_1a07557aeee28ba41e80b8b847e965ee11)| Returns the previous CPU mode and resets the flag. |
26
+
|[`wasInCPUMode`](#class_low_power_portenta_h7_1ae2059eb4fb01a30342b9fb6918b6ab4c)| Checks if the microcontroller was in the given standby mode before waking up. Note: It's possible that the microcontroller was in more than one of these modes during standby. 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 wakes up. |
27
+
|[`resetPreviousCPUModeFlags`](#class_low_power_portenta_h7_1a1753e3c053b2b64b59da3cbb9b921d76)| Reset the flags that are used to determine the microcontroller's previous standby mode. This is necessary to get correct results from [wasInCPUMode()](#class_low_power_portenta_h7_1ae2059eb4fb01a30342b9fb6918b6ab4c). |
27
28
|[`numberOfDeepSleepLocks`](#class_low_power_portenta_h7_1a9d2730d86abf42782261b0f03778c3bb)| Check how many Deep Sleep locks are held at the moment. |
28
29
|[`prepareOptionBytes`](#class_low_power_portenta_h7_1abdc0ce13b68d3a2188702690997af2ae)| Prepare the option bytes for entry into Standby Mode. |
29
30
|[`standbyM4`](#class_low_power_portenta_h7_1a9e07fd4f7895a7753e7e28f99aca1ace)| Make the M4 core enter Standby Mode. |
30
31
|[`standbyM7`](#class_low_power_portenta_h7_1a1eb5cec6e9604a48074f1c10ef5e7fb0)| Make the M7 core enter Standby Mode. |
31
-
|[`timeSinceBoot`](#class_low_power_portenta_h7_1a4758c25574b6d099545ac8d55eff6f68)| Time since the board was booted. |
32
+
|[`timeSinceBoot`](#class_low_power_portenta_h7_1a4758c25574b6d099545ac8d55eff6f68)| Time since the board was booted. It reports the time since the last wake-up reset (after standby) or power-on depending on what happened last. |
32
33
|[`timeSpentIdle`](#class_low_power_portenta_h7_1ad42fdfa6885d8e0fdca5aa012fdb4c60)| Time spent in idle. |
33
34
|[`timeSpentInSleep`](#class_low_power_portenta_h7_1a994eb6fcc0382515a82b81fa37ca9f3c)| Time spent in Sleep Mode. |
34
35
|[`timeSpentInDeepSleep`](#class_low_power_portenta_h7_1a146eb61800a74360687fd34b456c0b44)| Time spent in Deep Sleep Mode. |
@@ -69,16 +70,28 @@ Check if the option bytes are correct to enter Standby Mode.
Returns the previous CPU mode and resets the flag.
79
+
Checks if the microcontroller was in the given standby mode before waking up. Note: It's possible that the microcontroller was in more than one of these modes during standby. 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 wakes up.
80
+
#### Parameters
81
+
* `mode` The CPU mode to check.
79
82
80
83
#### Returns
81
-
The previous CPU mode.
84
+
True if the microcontroller was in the given mode, false otherwise.
Reset the flags that are used to determine the microcontroller's previous standby mode. This is necessary to get correct results from [wasInCPUMode()](#class_low_power_portenta_h7_1ae2059eb4fb01a30342b9fb6918b6ab4c).
0 commit comments