diff options
author | barthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-01-04 20:14:01 +0000 |
---|---|---|
committer | barthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-01-04 20:14:01 +0000 |
commit | 05b919403101cc7395776aa24b92369564c91968 (patch) | |
tree | 97832a449711617e087d759b9d84bdf49b6a0d74 /os/hal/platforms/STM32F1xx/hal_lld.h | |
parent | 9f2e4d3c4c3e58e1b7166265e943af59c111f39a (diff) | |
parent | c506b8f2b1bf2446442040cd3f00f8750754d5aa (diff) | |
download | ChibiOS-05b919403101cc7395776aa24b92369564c91968.tar.gz ChibiOS-05b919403101cc7395776aa24b92369564c91968.tar.bz2 ChibiOS-05b919403101cc7395776aa24b92369564c91968.zip |
PVD. Merged to trunk. Checked compilability on F1x, L1x, F4x.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3733 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms/STM32F1xx/hal_lld.h')
-rw-r--r-- | os/hal/platforms/STM32F1xx/hal_lld.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/os/hal/platforms/STM32F1xx/hal_lld.h b/os/hal/platforms/STM32F1xx/hal_lld.h index 4e1ca3f35..cf8e09cbe 100644 --- a/os/hal/platforms/STM32F1xx/hal_lld.h +++ b/os/hal/platforms/STM32F1xx/hal_lld.h @@ -48,10 +48,37 @@ /*===========================================================================*/
/* Driver constants. */
/*===========================================================================*/
+/**
+ * @name PWR_CR register bits definitions
+ * @{
+ */
+#define STM32_PLS_MASK (7 << 5) /**< PLS bits mask. */
+#define STM32_PLS_LEV0 (0 << 5) /**< PVD level 0. */
+#define STM32_PLS_LEV1 (1 << 5) /**< PVD level 0. */
+#define STM32_PLS_LEV2 (2 << 5) /**< PVD level 0. */
+#define STM32_PLS_LEV3 (3 << 5) /**< PVD level 0. */
+#define STM32_PLS_LEV4 (4 << 5) /**< PVD level 0. */
+#define STM32_PLS_LEV5 (5 << 5) /**< PVD level 0. */
+#define STM32_PLS_LEV6 (6 << 5) /**< PVD level 0. */
+#define STM32_PLS_LEV7 (7 << 5) /**< PVD level 0. */
+/** @} */
/*===========================================================================*/
/* Driver pre-compile time settings. */
/*===========================================================================*/
+/**
+ * @brief Enables or disables the programmable voltage detector.
+ */
+#if !defined(STM32_PVD_ENABLE) || defined(__DOXYGEN__)
+#define STM32_PVD_ENABLE FALSE
+#endif
+
+/**
+ * @brief Sets voltage level for programmable voltage detector.
+ */
+#if !defined(STM32_PLS) || defined(__DOXYGEN__)
+#define STM32_PLS STM32_PLS_LEV0
+#endif
/*===========================================================================*/
/* Derived constants and error checks. */
|