summaryrefslogtreecommitdiff
path: root/nuttx/arch/arm/src/stm32/stm32_pm.h
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/arch/arm/src/stm32/stm32_pm.h')
-rw-r--r--nuttx/arch/arm/src/stm32/stm32_pm.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/nuttx/arch/arm/src/stm32/stm32_pm.h b/nuttx/arch/arm/src/stm32/stm32_pm.h
index d08458d78..be040d296 100644
--- a/nuttx/arch/arm/src/stm32/stm32_pm.h
+++ b/nuttx/arch/arm/src/stm32/stm32_pm.h
@@ -111,6 +111,28 @@ EXTERN int stm32_pmstop(bool lpds);
EXTERN int stm32_pmstandby(void);
+/****************************************************************************
+ * Name: stm32_pmsleep
+ *
+ * Description:
+ * Enter SLEEP mode.
+ *
+ * Input Parameters:
+ * sleeponexit - true: SLEEPONEXIT bit is set when the WFI instruction is
+ * executed, the MCU enters Sleep mode as soon as it
+ * exits the lowest priority ISR.
+ * - false: SLEEPONEXIT bit is cleared, the MCU enters Sleep mode
+ * as soon as WFI or WFE instruction is executed.
+ * Returned Value:
+ * Zero means that the STOP was successfully entered and the system has
+ * been re-awakened. The internal volatage regulator is back to its
+ * original state. Otherwise, STOP mode did not occur and a negated
+ * errno value is returned to indicate the cause of the failure.
+ *
+ ****************************************************************************/
+
+EXTERN void stm32_pmsleep(bool sleeponexit);
+
#undef EXTERN
#ifdef __cplusplus
}