21 #ifndef __STM32L4xx_LL_RNG_H 22 #define __STM32L4xx_LL_RNG_H 29 #include "stm32l4xx.h" 47 #if defined(USE_FULL_LL_DRIVER) 53 #if defined(RNG_CR_CED) 76 #if defined(RNG_CR_CED) 80 #define LL_RNG_CED_ENABLE 0x00000000U 81 #define LL_RNG_CED_DISABLE RNG_CR_CED 92 #define LL_RNG_SR_DRDY RNG_SR_DRDY 93 #define LL_RNG_SR_CECS RNG_SR_CECS 94 #define LL_RNG_SR_SECS RNG_SR_SECS 95 #define LL_RNG_SR_CEIS RNG_SR_CEIS 96 #define LL_RNG_SR_SEIS RNG_SR_SEIS 105 #define LL_RNG_CR_IE RNG_CR_IE 130 #define LL_RNG_WriteReg(__INSTANCE__, __REG__, __VALUE__) WRITE_REG(__INSTANCE__->__REG__, (__VALUE__)) 138 #define LL_RNG_ReadReg(__INSTANCE__, __REG__) READ_REG(__INSTANCE__->__REG__) 164 SET_BIT(RNGx->CR, RNG_CR_RNGEN);
186 return (READ_BIT(RNGx->CR, RNG_CR_RNGEN) == (RNG_CR_RNGEN));
189 #if defined(RNG_CR_CED) 209 SET_BIT(RNGx->CR, RNG_CR_CED);
220 return (!(READ_BIT(RNGx->CR, RNG_CR_CED) == (RNG_CR_CED)));
241 return (READ_BIT(RNGx->SR, RNG_SR_DRDY) == (RNG_SR_DRDY));
252 return (READ_BIT(RNGx->SR, RNG_SR_CECS) == (RNG_SR_CECS));
263 return (READ_BIT(RNGx->SR, RNG_SR_SECS) == (RNG_SR_SECS));
274 return (READ_BIT(RNGx->SR, RNG_SR_CEIS) == (RNG_SR_CEIS));
285 return (READ_BIT(RNGx->SR, RNG_SR_SEIS) == (RNG_SR_SEIS));
296 WRITE_REG(RNGx->SR, ~RNG_SR_CEIS);
307 WRITE_REG(RNGx->SR, ~RNG_SR_SEIS);
327 SET_BIT(RNGx->CR, RNG_CR_IE);
351 return (READ_BIT(RNGx->CR, RNG_CR_IE) == (RNG_CR_IE));
370 return (uint32_t)(READ_REG(RNGx->DR));
377 #if defined(USE_FULL_LL_DRIVER) 381 #if defined(RNG_CR_CED) __STATIC_INLINE void LL_RNG_Disable(RNG_TypeDef *RNGx)
Disable Random Number Generation CR RNGEN LL_RNG_Disable.
__STATIC_INLINE uint32_t LL_RNG_IsEnabledClkErrorDetect(RNG_TypeDef *RNGx)
Check if RNG Clock Error Detection is enabled CR CED LL_RNG_IsEnabledClkErrorDetect.
ErrorStatus LL_RNG_Init(RNG_TypeDef *RNGx, LL_RNG_InitTypeDef *RNG_InitStruct)
Initialize RNG registers according to the specified parameters in RNG_InitStruct. ...
__STATIC_INLINE void LL_RNG_EnableClkErrorDetect(RNG_TypeDef *RNGx)
Enable RNG Clock Error Detection CR CED LL_RNG_EnableClkErrorDetect.
__STATIC_INLINE void LL_RNG_Enable(RNG_TypeDef *RNGx)
Enable Random Number Generation CR RNGEN LL_RNG_Enable.
uint32_t ClockErrorDetection
__STATIC_INLINE void LL_RNG_ClearFlag_CEIS(RNG_TypeDef *RNGx)
Clear Clock Error interrupt Status (CEIS) Flag SR CEIS LL_RNG_ClearFlag_CEIS.
CLEAR_BIT(hrtc->Instance->CR, RTC_CR_WUTE)
__STATIC_INLINE void LL_RNG_DisableIT(RNG_TypeDef *RNGx)
Disable Random Number Generator Interrupt (applies for either Seed error, Clock Error or Data ready i...
void LL_RNG_StructInit(LL_RNG_InitTypeDef *RNG_InitStruct)
Set each LL_RNG_InitTypeDef field to default value.
__STATIC_INLINE void LL_RNG_DisableClkErrorDetect(RNG_TypeDef *RNGx)
Disable RNG Clock Error Detection CR CED LL_RNG_DisableClkErrorDetect.
__STATIC_INLINE void LL_RNG_EnableIT(RNG_TypeDef *RNGx)
Enable Random Number Generator Interrupt (applies for either Seed error, Clock Error or Data ready in...
__STATIC_INLINE uint32_t LL_RNG_IsActiveFlag_SEIS(RNG_TypeDef *RNGx)
Indicate if the Seed Error Interrupt Status Flag is set or not SR SEIS LL_RNG_IsActiveFlag_SEIS.
__STATIC_INLINE uint32_t LL_RNG_IsActiveFlag_CECS(RNG_TypeDef *RNGx)
Indicate if the Clock Error Current Status Flag is set or not SR CECS LL_RNG_IsActiveFlag_CECS.
__STATIC_INLINE void LL_RNG_ClearFlag_SEIS(RNG_TypeDef *RNGx)
Clear Seed Error interrupt Status (SEIS) Flag SR SEIS LL_RNG_ClearFlag_SEIS.
ErrorStatus LL_RNG_DeInit(RNG_TypeDef *RNGx)
De-initialize RNG registers (Registers restored to their default values).
__STATIC_INLINE uint32_t LL_RNG_IsActiveFlag_SECS(RNG_TypeDef *RNGx)
Indicate if the Seed Error Current Status Flag is set or not SR SECS LL_RNG_IsActiveFlag_SECS.
__STATIC_INLINE uint32_t LL_RNG_ReadRandData32(RNG_TypeDef *RNGx)
Return32-bit Random Number value DR RNDATA LL_RNG_ReadRandData32.
__STATIC_INLINE uint32_t LL_RNG_IsActiveFlag_CEIS(RNG_TypeDef *RNGx)
Indicate if the Clock Error Interrupt Status Flag is set or not SR CEIS LL_RNG_IsActiveFlag_CEIS.
LL RNG Init Structure Definition.
__STATIC_INLINE uint32_t LL_RNG_IsEnabledIT(RNG_TypeDef *RNGx)
Check if Random Number Generator Interrupt is enabled (applies for either Seed error, Clock Error or Data ready interrupts) CR IE LL_RNG_IsEnabledIT.
__STATIC_INLINE uint32_t LL_RNG_IsActiveFlag_DRDY(RNG_TypeDef *RNGx)
Indicate if the RNG Data ready Flag is set or not SR DRDY LL_RNG_IsActiveFlag_DRDY.
__STATIC_INLINE uint32_t LL_RNG_IsEnabled(RNG_TypeDef *RNGx)
Check if Random Number Generator is enabled CR RNGEN LL_RNG_IsEnabled.