replaced TRNG frequency check macro with osalDbgAssert
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@14611 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
parent
614920363e
commit
5b35ee9ab8
|
@ -82,6 +82,12 @@ void trng_lld_init(void) {
|
|||
*/
|
||||
void trng_lld_start(TRNGDriver *trngp) {
|
||||
|
||||
#if !defined(STM32_DISABLE_RNG_CLOCK_CHECK)
|
||||
osalDbgAssert(((STM32_RNGCLK >= 47000000) && (STM32_RNGCLK <= 49000000)) ||
|
||||
((STM32_RNGCLK >= 3500000) && (STM32_RNGCLK <= 4500000)),
|
||||
"invalid RNG frequency");
|
||||
#endif
|
||||
|
||||
/* There is no real configuration but setting up a valid pointer anyway.*/
|
||||
if (trngp->config == NULL) {
|
||||
trngp->config = &default_cfg;
|
||||
|
|
|
@ -85,14 +85,6 @@
|
|||
#error "STM32_RNGCLK not defined in this HAL"
|
||||
#endif
|
||||
|
||||
#if ((STM32_RNGCLK < 47000000) || (STM32_RNGCLK > 49000000)) && \
|
||||
((STM32_RNGCLK < 3500000) || (STM32_RNGCLK > 4500000))
|
||||
#if !defined(STM32_DISABLE_RNG_CLOCK_CHECK)
|
||||
#error "STM32_RNGCLK is not within a tested clock range"
|
||||
#error "define STM32_DISABLE_RNG_CLOCK_CHECK to override this check"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/* Driver data structures and types. */
|
||||
/*===========================================================================*/
|
||||
|
|
Loading…
Reference in New Issue