diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-07-18 22:54:33 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-07-18 22:54:33 +0000 |
commit | c27590b084adfd6138643432c97f6d04963a6f0f (patch) | |
tree | 75f3c460332661d905db646b240b1a2e1f9f5ecf /nuttx/arch/arm/src/stm32/stm32_pm.h | |
parent | 08acfbbbbfc832365e3f28a73b7f059d885082f4 (diff) | |
download | px4-nuttx-c27590b084adfd6138643432c97f6d04963a6f0f.tar.gz px4-nuttx-c27590b084adfd6138643432c97f6d04963a6f0f.tar.bz2 px4-nuttx-c27590b084adfd6138643432c97f6d04963a6f0f.zip |
Add STM32 PM sleep support
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4953 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/arm/src/stm32/stm32_pm.h')
-rw-r--r-- | nuttx/arch/arm/src/stm32/stm32_pm.h | 22 |
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 } |