Removed duplicated check.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@14305 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
parent
af91d0e1de
commit
6ffbdecc93
|
@ -911,20 +911,6 @@
|
||||||
*/
|
*/
|
||||||
#if STM32_HSE_ENABLED
|
#if STM32_HSE_ENABLED
|
||||||
|
|
||||||
#if STM32_HSECLK == 0
|
|
||||||
#error "HSE frequency not defined"
|
|
||||||
#else /* STM32_HSECLK != 0 */
|
|
||||||
#if defined(STM32_HSE_BYPASS)
|
|
||||||
#if (STM32_HSECLK < STM32_HSECLK_BYP_MIN) || (STM32_HSECLK > STM32_HSECLK_BYP_MAX)
|
|
||||||
#error "STM32_HSECLK outside acceptable range (STM32_HSECLK_BYP_MIN...STM32_HSECLK_BYP_MAX)"
|
|
||||||
#endif
|
|
||||||
#else /* !defined(STM32_HSE_BYPASS) */
|
|
||||||
#if (STM32_HSECLK < STM32_HSECLK_MIN) || (STM32_HSECLK > STM32_HSECLK_MAX)
|
|
||||||
#error "STM32_HSECLK outside acceptable range (STM32_HSECLK_MIN...STM32_HSECLK_MAX)"
|
|
||||||
#endif
|
|
||||||
#endif /* !defined(STM32_HSE_BYPASS) */
|
|
||||||
#endif /* STM32_HSECLK != 0 */
|
|
||||||
|
|
||||||
#else /* !STM32_HSE_ENABLED */
|
#else /* !STM32_HSE_ENABLED */
|
||||||
|
|
||||||
#if STM32_SW == STM32_SW_HSE
|
#if STM32_SW == STM32_SW_HSE
|
||||||
|
|
|
@ -1101,51 +1101,37 @@
|
||||||
*/
|
*/
|
||||||
#if STM32_HSE_ENABLED
|
#if STM32_HSE_ENABLED
|
||||||
|
|
||||||
#if STM32_HSECLK == 0
|
#else /* !STM32_HSE_ENABLED */
|
||||||
#error "HSE frequency not defined"
|
|
||||||
#else /* STM32_HSECLK != 0 */
|
|
||||||
#if defined(STM32_HSE_BYPASS)
|
|
||||||
#if (STM32_HSECLK < STM32_HSECLK_BYP_MIN) || (STM32_HSECLK > STM32_HSECLK_BYP_MAX)
|
|
||||||
#error "STM32_HSECLK outside acceptable range (STM32_HSECLK_BYP_MIN...STM32_HSECLK_BYP_MAX)"
|
|
||||||
#endif
|
|
||||||
#else /* !defined(STM32_HSE_BYPASS) */
|
|
||||||
#if (STM32_HSECLK < STM32_HSECLK_MIN) || (STM32_HSECLK > STM32_HSECLK_MAX)
|
|
||||||
#error "STM32_HSECLK outside acceptable range (STM32_HSECLK_MIN...STM32_HSECLK_MAX)"
|
|
||||||
#endif
|
|
||||||
#endif /* !defined(STM32_HSE_BYPASS) */
|
|
||||||
#endif /* STM32_HSECLK != 0 */
|
|
||||||
|
|
||||||
#else /* !STM32_HSE_ENABLED */
|
#if STM32_SW == STM32_SW_HSE
|
||||||
|
#error "HSE not enabled, required by STM32_SW"
|
||||||
|
#endif
|
||||||
|
|
||||||
#if STM32_SW == STM32_SW_HSE
|
#if (STM32_SW == STM32_SW_PLL) && (STM32_PLLSRC == STM32_PLLSRC_HSE)
|
||||||
#error "HSE not enabled, required by STM32_SW"
|
#error "HSE not enabled, required by STM32_SW and STM32_PLLSRC"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (STM32_SW == STM32_SW_PLL) && (STM32_PLLSRC == STM32_PLLSRC_HSE)
|
#if (STM32_MCOSEL == STM32_MCOSEL_HSE) || \
|
||||||
#error "HSE not enabled, required by STM32_SW and STM32_PLLSRC"
|
((STM32_MCOSEL == STM32_MCOSEL_PLL) && \
|
||||||
#endif
|
(STM32_PLLSRC == STM32_PLLSRC_HSE))
|
||||||
|
#error "HSE not enabled, required by STM32_MCOSEL"
|
||||||
|
#endif
|
||||||
|
|
||||||
#if (STM32_MCOSEL == STM32_MCOSEL_HSE) || \
|
#if ((STM32_SAI1SEL == STM32_SAI1SEL_PLLSAI1) | \
|
||||||
((STM32_MCOSEL == STM32_MCOSEL_PLL) && \
|
(STM32_SAI1SEL == STM32_SAI1SEL_PLLSAI2)) && \
|
||||||
(STM32_PLLSRC == STM32_PLLSRC_HSE))
|
(STM32_PLLSRC == STM32_PLLSRC_HSE)
|
||||||
#error "HSE not enabled, required by STM32_MCOSEL"
|
#error "HSE not enabled, required by STM32_SAI1SEL"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ((STM32_SAI1SEL == STM32_SAI1SEL_PLLSAI1) | \
|
#if ((STM32_SAI2SEL == STM32_SAI2SEL_PLLSAI1) | \
|
||||||
(STM32_SAI1SEL == STM32_SAI1SEL_PLLSAI2)) && \
|
(STM32_SAI2SEL == STM32_SAI2SEL_PLLSAI2)) && \
|
||||||
(STM32_PLLSRC == STM32_PLLSRC_HSE)
|
(STM32_PLLSRC == STM32_PLLSRC_HSE)
|
||||||
#error "HSE not enabled, required by STM32_SAI1SEL"
|
#error "HSE not enabled, required by STM32_SAI2SEL"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ((STM32_SAI2SEL == STM32_SAI2SEL_PLLSAI1) | \
|
#if STM32_RTCSEL == STM32_RTCSEL_HSEDIV
|
||||||
(STM32_SAI2SEL == STM32_SAI2SEL_PLLSAI2)) && \
|
#error "HSE not enabled, required by STM32_RTCSEL"
|
||||||
(STM32_PLLSRC == STM32_PLLSRC_HSE)
|
#endif
|
||||||
#error "HSE not enabled, required by STM32_SAI2SEL"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if STM32_RTCSEL == STM32_RTCSEL_HSEDIV
|
|
||||||
#error "HSE not enabled, required by STM32_RTCSEL"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* !STM32_HSE_ENABLED */
|
#endif /* !STM32_HSE_ENABLED */
|
||||||
|
|
||||||
|
|
|
@ -1035,51 +1035,37 @@
|
||||||
*/
|
*/
|
||||||
#if STM32_HSE_ENABLED
|
#if STM32_HSE_ENABLED
|
||||||
|
|
||||||
#if STM32_HSECLK == 0
|
#else /* !STM32_HSE_ENABLED */
|
||||||
#error "HSE frequency not defined"
|
|
||||||
#else /* STM32_HSECLK != 0 */
|
|
||||||
#if defined(STM32_HSE_BYPASS)
|
|
||||||
#if (STM32_HSECLK < STM32_HSECLK_BYP_MIN) || (STM32_HSECLK > STM32_HSECLK_BYP_MAX)
|
|
||||||
#error "STM32_HSECLK outside acceptable range (STM32_HSECLK_BYP_MIN...STM32_HSECLK_BYP_MAX)"
|
|
||||||
#endif
|
|
||||||
#else /* !defined(STM32_HSE_BYPASS) */
|
|
||||||
#if (STM32_HSECLK < STM32_HSECLK_MIN) || (STM32_HSECLK > STM32_HSECLK_MAX)
|
|
||||||
#error "STM32_HSECLK outside acceptable range (STM32_HSECLK_MIN...STM32_HSECLK_MAX)"
|
|
||||||
#endif
|
|
||||||
#endif /* !defined(STM32_HSE_BYPASS) */
|
|
||||||
#endif /* STM32_HSECLK != 0 */
|
|
||||||
|
|
||||||
#else /* !STM32_HSE_ENABLED */
|
#if STM32_SW == STM32_SW_HSE
|
||||||
|
#error "HSE not enabled, required by STM32_SW"
|
||||||
|
#endif
|
||||||
|
|
||||||
#if STM32_SW == STM32_SW_HSE
|
#if (STM32_SW == STM32_SW_PLL) && (STM32_PLLSRC == STM32_PLLSRC_HSE)
|
||||||
#error "HSE not enabled, required by STM32_SW"
|
#error "HSE not enabled, required by STM32_SW and STM32_PLLSRC"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (STM32_SW == STM32_SW_PLL) && (STM32_PLLSRC == STM32_PLLSRC_HSE)
|
#if (STM32_MCOSEL == STM32_MCOSEL_HSE) || \
|
||||||
#error "HSE not enabled, required by STM32_SW and STM32_PLLSRC"
|
((STM32_MCOSEL == STM32_MCOSEL_PLL) && \
|
||||||
#endif
|
(STM32_PLLSRC == STM32_PLLSRC_HSE))
|
||||||
|
#error "HSE not enabled, required by STM32_MCOSEL"
|
||||||
|
#endif
|
||||||
|
|
||||||
#if (STM32_MCOSEL == STM32_MCOSEL_HSE) || \
|
#if ((STM32_SAI1SEL == STM32_SAI1SEL_PLLSAI1) | \
|
||||||
((STM32_MCOSEL == STM32_MCOSEL_PLL) && \
|
(STM32_SAI1SEL == STM32_SAI1SEL_PLLSAI2)) && \
|
||||||
(STM32_PLLSRC == STM32_PLLSRC_HSE))
|
(STM32_PLLSRC == STM32_PLLSRC_HSE)
|
||||||
#error "HSE not enabled, required by STM32_MCOSEL"
|
#error "HSE not enabled, required by STM32_SAI1SEL"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ((STM32_SAI1SEL == STM32_SAI1SEL_PLLSAI1) | \
|
#if ((STM32_SAI2SEL == STM32_SAI2SEL_PLLSAI1) | \
|
||||||
(STM32_SAI1SEL == STM32_SAI1SEL_PLLSAI2)) && \
|
(STM32_SAI2SEL == STM32_SAI2SEL_PLLSAI2)) && \
|
||||||
(STM32_PLLSRC == STM32_PLLSRC_HSE)
|
(STM32_PLLSRC == STM32_PLLSRC_HSE)
|
||||||
#error "HSE not enabled, required by STM32_SAI1SEL"
|
#error "HSE not enabled, required by STM32_SAI2SEL"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ((STM32_SAI2SEL == STM32_SAI2SEL_PLLSAI1) | \
|
#if STM32_RTCSEL == STM32_RTCSEL_HSEDIV
|
||||||
(STM32_SAI2SEL == STM32_SAI2SEL_PLLSAI2)) && \
|
#error "HSE not enabled, required by STM32_RTCSEL"
|
||||||
(STM32_PLLSRC == STM32_PLLSRC_HSE)
|
#endif
|
||||||
#error "HSE not enabled, required by STM32_SAI2SEL"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if STM32_RTCSEL == STM32_RTCSEL_HSEDIV
|
|
||||||
#error "HSE not enabled, required by STM32_RTCSEL"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* !STM32_HSE_ENABLED */
|
#endif /* !STM32_HSE_ENABLED */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue