Changed check in RNGv1 driver.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@13168 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
Giovanni Di Sirio 2019-11-09 10:25:08 +00:00
parent ab807dd10d
commit db257ce84e
2 changed files with 9 additions and 5 deletions

View File

@ -45,7 +45,7 @@ TRNGDriver TRNGD1;
/* Driver local variables and types. */
/*===========================================================================*/
static const TRNGConfig default_cfg = {0};
static const TRNGConfig default_cfg = {.cr = 0};
/*===========================================================================*/
/* Driver local functions. */

View File

@ -85,8 +85,12 @@
#error "STM32_RNGCLK not defined in this HAL"
#endif
#if STM32_RNGCLK != 48000000
#error "STM32_RNGCLK is not exactly 48000000"
#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
/*===========================================================================*/
@ -101,8 +105,8 @@
* @brief Low level fields of the TRNG configuration structure.
*/
#define trng_lld_config_fields \
/* Dummy configuration, it is not needed.*/ \
uint32_t dummy
/* CR register initialization value.*/ \
uint32_t cr
/**
* @brief Low level fields of the TRNG driver structure.