git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6789 35acf78f-673a-0410-8e92-d51de3d6d3f4
master
gdisirio 2014-03-19 10:11:57 +00:00
parent b54cc0d618
commit c322035d6b
1 changed files with 16 additions and 16 deletions

View File

@ -340,7 +340,7 @@
/** /**
* @brief HSE divider toward RTC setting. * @brief HSE divider toward RTC setting.
*/ */
#if !defined(STM32_RTCSEL) || defined(__DOXYGEN__) #if !defined(STM32_RTCPRE) || defined(__DOXYGEN__)
#define STM32_RTCPRE STM32_RTCPRE_DIV2 #define STM32_RTCPRE STM32_RTCPRE_DIV2
#endif #endif
/** @} */ /** @} */
@ -459,7 +459,7 @@
(STM32_MCOSEL == STM32_MCOSEL_HSE) || \ (STM32_MCOSEL == STM32_MCOSEL_HSE) || \
((STM32_MCOSEL == STM32_MCOSEL_PLL) && \ ((STM32_MCOSEL == STM32_MCOSEL_PLL) && \
(STM32_PLLSRC == STM32_PLLSRC_HSE)) || \ (STM32_PLLSRC == STM32_PLLSRC_HSE)) || \
(STM_RTC_SOURCE == STM32_RTCSEL_HSEDIV) (STM32_RTCSEL == STM32_RTCSEL_HSEDIV)
#error "required HSE clock is not enabled" #error "required HSE clock is not enabled"
#endif #endif
#endif /* !STM32_HSE_ENABLED */ #endif /* !STM32_HSE_ENABLED */
@ -467,7 +467,7 @@
/* LSI related checks.*/ /* LSI related checks.*/
#if STM32_LSI_ENABLED #if STM32_LSI_ENABLED
#else /* !STM32_LSI_ENABLED */ #else /* !STM32_LSI_ENABLED */
#if STM_RTCCLK == STM32_LSICLK #if STM32_RTCCLK == STM32_LSICLK
#error "required LSI clock is not enabled" #error "required LSI clock is not enabled"
#endif #endif
#endif /* !STM32_LSI_ENABLED */ #endif /* !STM32_LSI_ENABLED */
@ -481,7 +481,7 @@
#error "STM32_LSECLK outside acceptable range (1...1000kHz)" #error "STM32_LSECLK outside acceptable range (1...1000kHz)"
#endif #endif
#else /* !STM32_LSE_ENABLED */ #else /* !STM32_LSE_ENABLED */
#if STM_RTCCLK == STM32_LSECLK #if STM32_RTCCLK == STM32_LSECLK
#error "required LSE clock is not enabled" #error "required LSE clock is not enabled"
#endif #endif
#endif /* !STM32_LSE_ENABLED */ #endif /* !STM32_LSE_ENABLED */
@ -695,19 +695,19 @@
* @brief MCO divider clock. * @brief MCO divider clock.
*/ */
#if (STM32_MCOSEL == STM32_MCOSEL_NOCLOCK) || defined(__DOXYGEN__) #if (STM32_MCOSEL == STM32_MCOSEL_NOCLOCK) || defined(__DOXYGEN__)
#define STM_MCODIVCLK 0 #define STM32_MCODIVCLK 0
#elif STM32_MCOSEL == STM32_MCOSEL_HSI #elif STM32_MCOSEL == STM32_MCOSEL_HSI
#define STM_MCODIVCLK STM32_HSICLK #define STM32_MCODIVCLK STM32_HSICLK
#elif STM32_MCOSEL == STM32_MCOSEL_MSI #elif STM32_MCOSEL == STM32_MCOSEL_MSI
#define STM_MCODIVCLK STM32_MSICLK #define STM32_MCODIVCLK STM32_MSICLK
#elif STM32_MCOSEL == STM32_MCOSEL_HSE #elif STM32_MCOSEL == STM32_MCOSEL_HSE
#define STM_MCODIVCLK STM32_HSECLK #define STM32_MCODIVCLK STM32_HSECLK
#elif STM32_MCOSEL == STM32_MCOSEL_PLL #elif STM32_MCOSEL == STM32_MCOSEL_PLL
#define STM_MCODIVCLK STM32_PLLCLKOUT #define STM32_MCODIVCLK STM32_PLLCLKOUT
#elif STM32_MCOSEL == STM32_MCOSEL_LSI #elif STM32_MCOSEL == STM32_MCOSEL_LSI
#define STM_MCODIVCLK STM32_LSICLK #define STM32_MCODIVCLK STM32_LSICLK
#elif STM32_MCOSEL == STM32_MCOSEL_LSE #elif STM32_MCOSEL == STM32_MCOSEL_LSE
#define STM_MCODIVCLK STM32_LSECLK #define STM32_MCODIVCLK STM32_LSECLK
#else #else
#error "invalid STM32_MCOSEL value specified" #error "invalid STM32_MCOSEL value specified"
#endif #endif
@ -716,15 +716,15 @@
* @brief MCO output pin clock. * @brief MCO output pin clock.
*/ */
#if (STM32_MCOPRE == STM32_MCOPRE_DIV1) || defined(__DOXYGEN__) #if (STM32_MCOPRE == STM32_MCOPRE_DIV1) || defined(__DOXYGEN__)
#define STM_MCOCLK STM_MCODIVCLK #define STM32_MCOCLK STM32_MCODIVCLK
#elif STM32_MCOPRE == STM32_MCOPRE_DIV2 #elif STM32_MCOPRE == STM32_MCOPRE_DIV2
#define STM_MCOCLK (STM_MCODIVCLK / 2) #define STM32_MCOCLK (STM32_MCODIVCLK / 2)
#elif STM32_MCOPRE == STM32_MCOPRE_DIV4 #elif STM32_MCOPRE == STM32_MCOPRE_DIV4
#define STM_MCOCLK (STM_MCODIVCLK / 4) #define STM32_MCOCLK (STM32_MCODIVCLK / 4)
#elif STM32_MCOPRE == STM32_MCOPRE_DIV8 #elif STM32_MCOPRE == STM32_MCOPRE_DIV8
#define STM_MCOCLK (STM_MCODIVCLK / 8) #define STM32_MCOCLK (STM32_MCODIVCLK / 8)
#elif STM32_MCOPRE == STM32_MCOPRE_DIV16 #elif STM32_MCOPRE == STM32_MCOPRE_DIV16
#define STM_MCOCLK (STM_MCODIVCLK / 16) #define STM32_MCOCLK (STM32_MCODIVCLK / 16)
#else #else
#error "invalid STM32_MCOPRE value specified" #error "invalid STM32_MCOPRE value specified"
#endif #endif