30 #ifndef __STM32F4xx_RNG_H
31 #define __STM32F4xx_RNG_H
38 #include "stm32f4xx.h"
58 #define RNG_FLAG_DRDY ((uint8_t)0x0001)
59 #define RNG_FLAG_CECS ((uint8_t)0x0002)
60 #define RNG_FLAG_SECS ((uint8_t)0x0004)
62 #define IS_RNG_GET_FLAG(RNG_FLAG) (((RNG_FLAG) == RNG_FLAG_DRDY) || \
63 ((RNG_FLAG) == RNG_FLAG_CECS) || \
64 ((RNG_FLAG) == RNG_FLAG_SECS))
65 #define IS_RNG_CLEAR_FLAG(RNG_FLAG) (((RNG_FLAG) == RNG_FLAG_CECS) || \
66 ((RNG_FLAG) == RNG_FLAG_SECS))
74 #define RNG_IT_CEI ((uint8_t)0x20)
75 #define RNG_IT_SEI ((uint8_t)0x40)
77 #define IS_RNG_IT(IT) ((((IT) & (uint8_t)0x9F) == 0x00) && ((IT) != 0x00))
78 #define IS_RNG_GET_IT(RNG_IT) (((RNG_IT) == RNG_IT_CEI) || ((RNG_IT) == RNG_IT_SEI))
94 void RNG_Cmd(FunctionalState NewState);
void RNG_DeInit(void)
De-initializes the RNG peripheral registers to their default reset values.
uint32_t RNG_GetRandomNumber(void)
Returns a 32-bit random number.
void RNG_ClearFlag(uint8_t RNG_FLAG)
Clears the RNG flags.
void RNG_Cmd(FunctionalState NewState)
Enables or disables the RNG peripheral.
void RNG_ClearITPendingBit(uint8_t RNG_IT)
Clears the RNG interrupt pending bit(s).
void RNG_ITConfig(FunctionalState NewState)
Enables or disables the RNG interrupt.
FlagStatus RNG_GetFlagStatus(uint8_t RNG_FLAG)
Checks whether the specified RNG flag is set or not.
ITStatus RNG_GetITStatus(uint8_t RNG_IT)
Checks whether the specified RNG interrupt has occurred or not.