Set blackbox file handler to NULL after closing file
[inav.git] / lib / main / STM32F4 / Drivers / STM32F4xx_StdPeriph_Driver / inc / stm32f4xx_rng.h
blobfca226a6ec91194fb1052e5aaedea3c92ebeb832
1 /**
2 ******************************************************************************
3 * @file stm32f4xx_rng.h
4 * @author MCD Application Team
5 * @version V1.7.1
6 * @date 20-May-2016
7 * @brief This file contains all the functions prototypes for the Random
8 * Number Generator(RNG) firmware library.
9 ******************************************************************************
10 * @attention
12 * <h2><center>&copy; COPYRIGHT 2016 STMicroelectronics</center></h2>
14 * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
15 * You may not use this file except in compliance with the License.
16 * You may obtain a copy of the License at:
18 * http://www.st.com/software_license_agreement_liberty_v2
20 * Unless required by applicable law or agreed to in writing, software
21 * distributed under the License is distributed on an "AS IS" BASIS,
22 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23 * See the License for the specific language governing permissions and
24 * limitations under the License.
26 ******************************************************************************
29 /* Define to prevent recursive inclusion -------------------------------------*/
30 #ifndef __STM32F4xx_RNG_H
31 #define __STM32F4xx_RNG_H
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
37 /* Includes ------------------------------------------------------------------*/
38 #include "stm32f4xx.h"
40 /** @addtogroup STM32F4xx_StdPeriph_Driver
41 * @{
44 /** @addtogroup RNG
45 * @{
46 */
47 #if defined(STM32F40_41xxx) || defined(STM32F427_437xx) || defined(STM32F410xx) || defined(STM32F412xG) || defined(STM32F429_439xx) || defined(STM32F469_479xx)
48 /* Exported types ------------------------------------------------------------*/
49 /* Exported constants --------------------------------------------------------*/
51 /** @defgroup RNG_Exported_Constants
52 * @{
55 /** @defgroup RNG_flags_definition
56 * @{
57 */
58 #define RNG_FLAG_DRDY ((uint8_t)0x0001) /*!< Data ready */
59 #define RNG_FLAG_CECS ((uint8_t)0x0002) /*!< Clock error current status */
60 #define RNG_FLAG_SECS ((uint8_t)0x0004) /*!< Seed error current status */
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 /**
68 * @}
69 */
71 /** @defgroup RNG_interrupts_definition
72 * @{
73 */
74 #define RNG_IT_CEI ((uint8_t)0x20) /*!< Clock error interrupt */
75 #define RNG_IT_SEI ((uint8_t)0x40) /*!< Seed error interrupt */
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 /**
80 * @}
81 */
83 /**
84 * @}
85 */
87 /* Exported macro ------------------------------------------------------------*/
88 /* Exported functions --------------------------------------------------------*/
90 /* Function used to set the RNG configuration to the default reset state *****/
91 void RNG_DeInit(void);
93 /* Configuration function *****************************************************/
94 void RNG_Cmd(FunctionalState NewState);
96 /* Get 32 bit Random number function ******************************************/
97 uint32_t RNG_GetRandomNumber(void);
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 #endif /* STM32F40_41xxx || STM32F427_437xx || STM32F410xx || STM32F412xG || STM32F429_439xx || STM32F469_479xx */
107 #ifdef __cplusplus
109 #endif
111 #endif /*__STM32F4xx_RNG_H */
114 * @}
118 * @}
121 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/