20 #ifndef STM32F4xx_LL_RNG_H
21 #define STM32F4xx_LL_RNG_H
28 #include "stm32f4xx.h"
57 #define LL_RNG_SR_DRDY RNG_SR_DRDY
58 #define LL_RNG_SR_CECS RNG_SR_CECS
59 #define LL_RNG_SR_SECS RNG_SR_SECS
60 #define LL_RNG_SR_CEIS RNG_SR_CEIS
61 #define LL_RNG_SR_SEIS RNG_SR_SEIS
70 #define LL_RNG_CR_IE RNG_CR_IE
95 #define LL_RNG_WriteReg(__INSTANCE__, __REG__, __VALUE__) WRITE_REG(__INSTANCE__->__REG__, (__VALUE__))
103 #define LL_RNG_ReadReg(__INSTANCE__, __REG__) READ_REG(__INSTANCE__->__REG__)
129 SET_BIT(RNGx->CR, RNG_CR_RNGEN);
140 CLEAR_BIT(RNGx->CR, RNG_CR_RNGEN);
151 return ((READ_BIT(RNGx->CR, RNG_CR_RNGEN) == (RNG_CR_RNGEN)) ? 1UL : 0UL);
170 return ((READ_BIT(RNGx->SR, RNG_SR_DRDY) == (RNG_SR_DRDY)) ? 1UL : 0UL);
181 return ((READ_BIT(RNGx->SR, RNG_SR_CECS) == (RNG_SR_CECS)) ? 1UL : 0UL);
192 return ((READ_BIT(RNGx->SR, RNG_SR_SECS) == (RNG_SR_SECS)) ? 1UL : 0UL);
203 return ((READ_BIT(RNGx->SR, RNG_SR_CEIS) == (RNG_SR_CEIS)) ? 1UL : 0UL);
214 return ((READ_BIT(RNGx->SR, RNG_SR_SEIS) == (RNG_SR_SEIS)) ? 1UL : 0UL);
225 WRITE_REG(RNGx->SR, ~RNG_SR_CEIS);
236 WRITE_REG(RNGx->SR, ~RNG_SR_SEIS);
256 SET_BIT(RNGx->CR, RNG_CR_IE);
268 CLEAR_BIT(RNGx->CR, RNG_CR_IE);
280 return ((READ_BIT(RNGx->CR, RNG_CR_IE) == (RNG_CR_IE)) ? 1UL : 0UL);
299 return (uint32_t)(READ_REG(RNGx->DR));
306 #if defined(USE_FULL_LL_DRIVER)
__STATIC_INLINE void LL_RNG_Enable(RNG_TypeDef *RNGx)
Enable Random Number Generation @rmtoll CR RNGEN LL_RNG_Enable.
__STATIC_INLINE uint32_t LL_RNG_IsEnabled(const RNG_TypeDef *RNGx)
Check if Random Number Generator is enabled @rmtoll CR RNGEN LL_RNG_IsEnabled.
__STATIC_INLINE void LL_RNG_Disable(RNG_TypeDef *RNGx)
Disable Random Number Generation @rmtoll CR RNGEN LL_RNG_Disable.
__STATIC_INLINE uint32_t LL_RNG_ReadRandData32(const RNG_TypeDef *RNGx)
Return32-bit Random Number value @rmtoll DR RNDATA LL_RNG_ReadRandData32.
__STATIC_INLINE void LL_RNG_ClearFlag_CEIS(RNG_TypeDef *RNGx)
Clear Clock Error interrupt Status (CEIS) Flag @rmtoll SR CEIS LL_RNG_ClearFlag_CEIS.
__STATIC_INLINE uint32_t LL_RNG_IsActiveFlag_CEIS(const RNG_TypeDef *RNGx)
Indicate if the Clock Error Interrupt Status Flag is set or not @rmtoll SR CEIS LL_RNG_IsActiveFlag_C...
__STATIC_INLINE uint32_t LL_RNG_IsActiveFlag_DRDY(const RNG_TypeDef *RNGx)
Indicate if the RNG Data ready Flag is set or not @rmtoll SR DRDY LL_RNG_IsActiveFlag_DRDY.
__STATIC_INLINE void LL_RNG_ClearFlag_SEIS(RNG_TypeDef *RNGx)
Clear Seed Error interrupt Status (SEIS) Flag @rmtoll SR SEIS LL_RNG_ClearFlag_SEIS.
__STATIC_INLINE uint32_t LL_RNG_IsActiveFlag_SECS(const RNG_TypeDef *RNGx)
Indicate if the Seed Error Current Status Flag is set or not @rmtoll SR SECS LL_RNG_IsActiveFlag_SECS...
__STATIC_INLINE uint32_t LL_RNG_IsActiveFlag_SEIS(const RNG_TypeDef *RNGx)
Indicate if the Seed Error Interrupt Status Flag is set or not @rmtoll SR SEIS LL_RNG_IsActiveFlag_SE...
__STATIC_INLINE uint32_t LL_RNG_IsActiveFlag_CECS(const RNG_TypeDef *RNGx)
Indicate if the Clock Error Current Status Flag is set or not @rmtoll SR CECS LL_RNG_IsActiveFlag_CEC...
__STATIC_INLINE uint32_t LL_RNG_IsEnabledIT(const RNG_TypeDef *RNGx)
Check if Random Number Generator Interrupt is enabled (applies for either Seed error,...
__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 void LL_RNG_DisableIT(RNG_TypeDef *RNGx)
Disable Random Number Generator Interrupt (applies for either Seed error, Clock Error or Data ready i...
ErrorStatus LL_RNG_DeInit(const RNG_TypeDef *RNGx)
De-initialize RNG registers (Registers restored to their default values).