diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-05-20 10:31:32 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-05-20 10:31:32 +0000 |
commit | 622b7a9359cc24f144567a3c51b4e4f3183ee6c9 (patch) | |
tree | 3b52af28da6d84dea068605cc4288ddfce9f650b | |
parent | 375f09131ac3648a448a4d5f1f3dcc8cc0304250 (diff) | |
download | ChibiOS-622b7a9359cc24f144567a3c51b4e4f3183ee6c9.tar.gz ChibiOS-622b7a9359cc24f144567a3c51b4e4f3183ee6c9.tar.bz2 ChibiOS-622b7a9359cc24f144567a3c51b4e4f3183ee6c9.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1943 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r-- | os/hal/platforms/STM32/hal_lld_f105_f107.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/os/hal/platforms/STM32/hal_lld_f105_f107.h b/os/hal/platforms/STM32/hal_lld_f105_f107.h index dd16740c8..6fadbbd7f 100644 --- a/os/hal/platforms/STM32/hal_lld_f105_f107.h +++ b/os/hal/platforms/STM32/hal_lld_f105_f107.h @@ -214,7 +214,7 @@ */
#if (STM32_PREDIV1_VALUE >= 1) && (STM32_PREDIV1_VALUE <= 16) || \
defined(__DOXYGEN__)
-#define STM32_PREDIV1 (STM32_PREDIV1_VALUE << 0)
+#define STM32_PREDIV1 ((STM32_PREDIV1_VALUE - 1) << 0)
#else
#error "invalid STM32_PREDIV1_VALUE value specified"
#endif
@@ -224,7 +224,7 @@ */
#if (STM32_PREDIV2_VALUE >= 1) && (STM32_PREDIV2_VALUE <= 16) || \
defined(__DOXYGEN__)
-#define STM32_PREDIV2 (STM32_PREDIV2_VALUE << 4)
+#define STM32_PREDIV2 ((STM32_PREDIV2_VALUE - 1) << 4)
#else
#error "invalid STM32_PREDIV2_VALUE value specified"
#endif
@@ -293,7 +293,7 @@ * @brief PLL input clock frequency.
*/
#if (STM32_PLLSRC == STM32_PLLSRC_PREDIV1) || defined(__DOXYGEN__)
-#define STM32_PLLCLKIN (STM32_PREDIV1CLK / STM32_PREDIV1)
+#define STM32_PLLCLKIN (STM32_PREDIV1CLK / STM32_PREDIV1_VALUE)
#elif STM32_PLLSRC == STM32_PLLSRC_HSI
#define STM32_PLLCLKIN (STM32_HSICLK / 2)
#else
|