Improved checks on PPL1.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@15864 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
parent
f67c8298d5
commit
07382282ba
|
@ -1660,9 +1660,9 @@
|
|||
/**
|
||||
* @brief PLL1 DIVP field.
|
||||
*/
|
||||
#if ((STM32_PLL1_DIVP_VALUE >= 1) && (STM32_PLL1_DIVP_VALUE <= 128) && \
|
||||
(STM32_PLL1_DIVP_VALUE != 3U)) || defined(__DOXYGEN__)
|
||||
#define STM32_PLL1_DIVP ((STM32_PLL1_DIVP_VALUE - 1U) << 9U)
|
||||
#if ((STM32_PLL1_DIVP_VALUE >= 2) && (STM32_PLL1_DIVP_VALUE <= 128) && \
|
||||
((STM32_PLL1_DIVP_VALUE & 1) == 0)) || defined(__DOXYGEN__)
|
||||
#define STM32_PLL1_DIVP ((STM32_PLL1_DIVP_VALUE - 1U) << RCC_PLL1DIVR_P1_Pos)
|
||||
#else
|
||||
#error "invalid STM32_PLL1_DIVP_VALUE value specified"
|
||||
#endif
|
||||
|
|
|
@ -1726,7 +1726,7 @@
|
|||
* @brief PLL1 DIVP field.
|
||||
*/
|
||||
#if ((STM32_PLL1_DIVP_VALUE >= 2) && (STM32_PLL1_DIVP_VALUE <= 128) && \
|
||||
((STM32_PLL1_DIVP_VALUE & 0x1) == 0x0)) || defined(__DOXYGEN__)
|
||||
((STM32_PLL1_DIVP_VALUE & 1) == 0)) || defined(__DOXYGEN__)
|
||||
#define STM32_PLL1_DIVP ((STM32_PLL1_DIVP_VALUE - 1U) << RCC_PLL1DIVR_P1_Pos)
|
||||
#else
|
||||
#error "invalid STM32_PLL1_DIVP_VALUE value specified"
|
||||
|
|
Loading…
Reference in New Issue