00001
00029
00030 #ifndef __STM32F4xx_RNG_H
00031 #define __STM32F4xx_RNG_H
00032
00033 #ifdef __cplusplus
00034 extern "C" {
00035 #endif
00036
00037
00038 #include "stm32f4xx.h"
00039
00048
00049
00050
00058 #define RNG_FLAG_DRDY ((uint8_t)0x0001)
00059 #define RNG_FLAG_CECS ((uint8_t)0x0002)
00060 #define RNG_FLAG_SECS ((uint8_t)0x0004)
00062 #define IS_RNG_GET_FLAG(RNG_FLAG) (((RNG_FLAG) == RNG_FLAG_DRDY) || \
00063 ((RNG_FLAG) == RNG_FLAG_CECS) || \
00064 ((RNG_FLAG) == RNG_FLAG_SECS))
00065 #define IS_RNG_CLEAR_FLAG(RNG_FLAG) (((RNG_FLAG) == RNG_FLAG_CECS) || \
00066 ((RNG_FLAG) == RNG_FLAG_SECS))
00067
00074 #define RNG_IT_CEI ((uint8_t)0x20)
00075 #define RNG_IT_SEI ((uint8_t)0x40)
00077 #define IS_RNG_IT(IT) ((((IT) & (uint8_t)0x9F) == 0x00) && ((IT) != 0x00))
00078 #define IS_RNG_GET_IT(RNG_IT) (((RNG_IT) == RNG_IT_CEI) || ((RNG_IT) == RNG_IT_SEI))
00079
00087
00088
00089
00090
00091 void RNG_DeInit(void);
00092
00093
00094 void RNG_Cmd(FunctionalState NewState);
00095
00096
00097 uint32_t RNG_GetRandomNumber(void);
00098
00099
00100 void RNG_ITConfig(FunctionalState NewState);
00101 FlagStatus RNG_GetFlagStatus(uint8_t RNG_FLAG);
00102 void RNG_ClearFlag(uint8_t RNG_FLAG);
00103 ITStatus RNG_GetITStatus(uint8_t RNG_IT);
00104 void RNG_ClearITPendingBit(uint8_t RNG_IT);
00105
00106 #ifdef __cplusplus
00107 }
00108 #endif
00109
00110 #endif
00111
00120