STM32F4 Standard Peripheral bibliotheek  1.0
ST Microelectronics bibliotheek documentatie voor de STM32F4 Standard Peripheral Library
 All Data Structures Files Functions Variables Enumerations Enumerator Groups
stm32f4xx_rng.h
Go to the documentation of this file.
1 
29 /* Define to prevent recursive inclusion -------------------------------------*/
30 #ifndef __STM32F4xx_RNG_H
31 #define __STM32F4xx_RNG_H
32 
33 #ifdef __cplusplus
34  extern "C" {
35 #endif
36 
37 /* Includes ------------------------------------------------------------------*/
38 #include "stm32f4xx.h"
39 
48 /* Exported types ------------------------------------------------------------*/
49 /* Exported constants --------------------------------------------------------*/
50 
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))
67 
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))
79 
87 /* Exported macro ------------------------------------------------------------*/
88 /* Exported functions --------------------------------------------------------*/
89 
90 /* Function used to set the RNG configuration to the default reset state *****/
91 void RNG_DeInit(void);
92 
93 /* Configuration function *****************************************************/
94 void RNG_Cmd(FunctionalState NewState);
95 
96 /* Get 32 bit Random number function ******************************************/
97 uint32_t RNG_GetRandomNumber(void);
98 
99 /* Interrupts and flags management functions **********************************/
100 void RNG_ITConfig(FunctionalState NewState);
101 FlagStatus RNG_GetFlagStatus(uint8_t RNG_FLAG);
102 void RNG_ClearFlag(uint8_t RNG_FLAG);
103 ITStatus RNG_GetITStatus(uint8_t RNG_IT);
104 void RNG_ClearITPendingBit(uint8_t RNG_IT);
105 
106 #ifdef __cplusplus
107 }
108 #endif
109 
110 #endif /*__STM32F4xx_RNG_H */
111 
120 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/