Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: hello SerialTestv11 SerialTestv12 Sierpinski ... more
TARGET_MTS_DRAGONFLY_F411RE/stm32f4xx_hal_rng.h@106:ba1f97679dad, 2015-09-02 (annotated)
- Committer:
- Kojto
- Date:
- Wed Sep 02 14:17:43 2015 +0100
- Revision:
- 106:ba1f97679dad
- Parent:
- 101:7cff1c4259d7
- Child:
- 110:165afa46840b
Release 106 of the mbed library
Changes:
- new platform - Nucleo F446RE
- STM32F4 Cube driver update v2.3.2
- ST cmsis driver v2.3.2
- nordic bugfix gcc linker start address
- lpc11u68 - bugfix for serial ports
Who changed what in which revision?
| User | Revision | Line number | New contents of line | 
|---|---|---|---|
| Kojto | 101:7cff1c4259d7 | 1 | /** | 
| Kojto | 101:7cff1c4259d7 | 2 | ****************************************************************************** | 
| Kojto | 101:7cff1c4259d7 | 3 | * @file stm32f4xx_hal_rng.h | 
| Kojto | 101:7cff1c4259d7 | 4 | * @author MCD Application Team | 
| Kojto | 106:ba1f97679dad | 5 | * @version V1.3.2 | 
| Kojto | 106:ba1f97679dad | 6 | * @date 26-June-2015 | 
| Kojto | 101:7cff1c4259d7 | 7 | * @brief Header file of RNG HAL module. | 
| Kojto | 101:7cff1c4259d7 | 8 | ****************************************************************************** | 
| Kojto | 101:7cff1c4259d7 | 9 | * @attention | 
| Kojto | 101:7cff1c4259d7 | 10 | * | 
| Kojto | 101:7cff1c4259d7 | 11 | * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> | 
| Kojto | 101:7cff1c4259d7 | 12 | * | 
| Kojto | 101:7cff1c4259d7 | 13 | * Redistribution and use in source and binary forms, with or without modification, | 
| Kojto | 101:7cff1c4259d7 | 14 | * are permitted provided that the following conditions are met: | 
| Kojto | 101:7cff1c4259d7 | 15 | * 1. Redistributions of source code must retain the above copyright notice, | 
| Kojto | 101:7cff1c4259d7 | 16 | * this list of conditions and the following disclaimer. | 
| Kojto | 101:7cff1c4259d7 | 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, | 
| Kojto | 101:7cff1c4259d7 | 18 | * this list of conditions and the following disclaimer in the documentation | 
| Kojto | 101:7cff1c4259d7 | 19 | * and/or other materials provided with the distribution. | 
| Kojto | 101:7cff1c4259d7 | 20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors | 
| Kojto | 101:7cff1c4259d7 | 21 | * may be used to endorse or promote products derived from this software | 
| Kojto | 101:7cff1c4259d7 | 22 | * without specific prior written permission. | 
| Kojto | 101:7cff1c4259d7 | 23 | * | 
| Kojto | 101:7cff1c4259d7 | 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | 
| Kojto | 101:7cff1c4259d7 | 25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | 
| Kojto | 101:7cff1c4259d7 | 26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 
| Kojto | 101:7cff1c4259d7 | 27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | 
| Kojto | 101:7cff1c4259d7 | 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | 
| Kojto | 101:7cff1c4259d7 | 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | 
| Kojto | 101:7cff1c4259d7 | 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | 
| Kojto | 101:7cff1c4259d7 | 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | 
| Kojto | 101:7cff1c4259d7 | 32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 
| Kojto | 101:7cff1c4259d7 | 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 
| Kojto | 101:7cff1c4259d7 | 34 | * | 
| Kojto | 101:7cff1c4259d7 | 35 | ****************************************************************************** | 
| Kojto | 101:7cff1c4259d7 | 36 | */ | 
| Kojto | 101:7cff1c4259d7 | 37 | |
| Kojto | 101:7cff1c4259d7 | 38 | /* Define to prevent recursive inclusion -------------------------------------*/ | 
| Kojto | 101:7cff1c4259d7 | 39 | #ifndef __STM32F4xx_HAL_RNG_H | 
| Kojto | 101:7cff1c4259d7 | 40 | #define __STM32F4xx_HAL_RNG_H | 
| Kojto | 101:7cff1c4259d7 | 41 | |
| Kojto | 101:7cff1c4259d7 | 42 | #ifdef __cplusplus | 
| Kojto | 101:7cff1c4259d7 | 43 | extern "C" { | 
| Kojto | 101:7cff1c4259d7 | 44 | #endif | 
| Kojto | 101:7cff1c4259d7 | 45 | |
| Kojto | 101:7cff1c4259d7 | 46 | #if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx) ||\ | 
| Kojto | 101:7cff1c4259d7 | 47 | defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) | 
| Kojto | 101:7cff1c4259d7 | 48 | |
| Kojto | 101:7cff1c4259d7 | 49 | /* Includes ------------------------------------------------------------------*/ | 
| Kojto | 101:7cff1c4259d7 | 50 | #include "stm32f4xx_hal_def.h" | 
| Kojto | 101:7cff1c4259d7 | 51 | |
| Kojto | 101:7cff1c4259d7 | 52 | /** @addtogroup STM32F4xx_HAL_Driver | 
| Kojto | 101:7cff1c4259d7 | 53 | * @{ | 
| Kojto | 101:7cff1c4259d7 | 54 | */ | 
| Kojto | 101:7cff1c4259d7 | 55 | |
| Kojto | 101:7cff1c4259d7 | 56 | /** @defgroup RNG RNG | 
| Kojto | 101:7cff1c4259d7 | 57 | * @brief RNG HAL module driver | 
| Kojto | 101:7cff1c4259d7 | 58 | * @{ | 
| Kojto | 101:7cff1c4259d7 | 59 | */ | 
| Kojto | 101:7cff1c4259d7 | 60 | |
| Kojto | 101:7cff1c4259d7 | 61 | /* Exported types ------------------------------------------------------------*/ | 
| Kojto | 101:7cff1c4259d7 | 62 | |
| Kojto | 101:7cff1c4259d7 | 63 | /** @defgroup RNG_Exported_Types RNG Exported Types | 
| Kojto | 101:7cff1c4259d7 | 64 | * @{ | 
| Kojto | 101:7cff1c4259d7 | 65 | */ | 
| Kojto | 101:7cff1c4259d7 | 66 | |
| Kojto | 101:7cff1c4259d7 | 67 | /** @defgroup RNG_Exported_Types_Group1 RNG State Structure definition | 
| Kojto | 101:7cff1c4259d7 | 68 | * @{ | 
| Kojto | 101:7cff1c4259d7 | 69 | */ | 
| Kojto | 101:7cff1c4259d7 | 70 | typedef enum | 
| Kojto | 101:7cff1c4259d7 | 71 | { | 
| Kojto | 101:7cff1c4259d7 | 72 | HAL_RNG_STATE_RESET = 0x00, /*!< RNG not yet initialized or disabled */ | 
| Kojto | 101:7cff1c4259d7 | 73 | HAL_RNG_STATE_READY = 0x01, /*!< RNG initialized and ready for use */ | 
| Kojto | 101:7cff1c4259d7 | 74 | HAL_RNG_STATE_BUSY = 0x02, /*!< RNG internal process is ongoing */ | 
| Kojto | 101:7cff1c4259d7 | 75 | HAL_RNG_STATE_TIMEOUT = 0x03, /*!< RNG timeout state */ | 
| Kojto | 101:7cff1c4259d7 | 76 | HAL_RNG_STATE_ERROR = 0x04 /*!< RNG error state */ | 
| Kojto | 101:7cff1c4259d7 | 77 | |
| Kojto | 101:7cff1c4259d7 | 78 | }HAL_RNG_StateTypeDef; | 
| Kojto | 101:7cff1c4259d7 | 79 | |
| Kojto | 101:7cff1c4259d7 | 80 | /** | 
| Kojto | 101:7cff1c4259d7 | 81 | * @} | 
| Kojto | 101:7cff1c4259d7 | 82 | */ | 
| Kojto | 101:7cff1c4259d7 | 83 | |
| Kojto | 101:7cff1c4259d7 | 84 | /** @defgroup RNG_Exported_Types_Group2 RNG Handle Structure definition | 
| Kojto | 101:7cff1c4259d7 | 85 | * @{ | 
| Kojto | 101:7cff1c4259d7 | 86 | */ | 
| Kojto | 101:7cff1c4259d7 | 87 | typedef struct | 
| Kojto | 101:7cff1c4259d7 | 88 | { | 
| Kojto | 101:7cff1c4259d7 | 89 | RNG_TypeDef *Instance; /*!< Register base address */ | 
| Kojto | 101:7cff1c4259d7 | 90 | |
| Kojto | 101:7cff1c4259d7 | 91 | HAL_LockTypeDef Lock; /*!< RNG locking object */ | 
| Kojto | 101:7cff1c4259d7 | 92 | |
| Kojto | 101:7cff1c4259d7 | 93 | __IO HAL_RNG_StateTypeDef State; /*!< RNG communication state */ | 
| Kojto | 101:7cff1c4259d7 | 94 | |
| Kojto | 101:7cff1c4259d7 | 95 | uint32_t RandomNumber; /*!< Last Generated RNG Data */ | 
| Kojto | 101:7cff1c4259d7 | 96 | |
| Kojto | 101:7cff1c4259d7 | 97 | }RNG_HandleTypeDef; | 
| Kojto | 101:7cff1c4259d7 | 98 | |
| Kojto | 101:7cff1c4259d7 | 99 | /** | 
| Kojto | 101:7cff1c4259d7 | 100 | * @} | 
| Kojto | 101:7cff1c4259d7 | 101 | */ | 
| Kojto | 101:7cff1c4259d7 | 102 | |
| Kojto | 101:7cff1c4259d7 | 103 | /** | 
| Kojto | 101:7cff1c4259d7 | 104 | * @} | 
| Kojto | 101:7cff1c4259d7 | 105 | */ | 
| Kojto | 101:7cff1c4259d7 | 106 | |
| Kojto | 101:7cff1c4259d7 | 107 | /* Exported constants --------------------------------------------------------*/ | 
| Kojto | 101:7cff1c4259d7 | 108 | |
| Kojto | 101:7cff1c4259d7 | 109 | /** @defgroup RNG_Exported_Constants RNG Exported Constants | 
| Kojto | 101:7cff1c4259d7 | 110 | * @{ | 
| Kojto | 101:7cff1c4259d7 | 111 | */ | 
| Kojto | 101:7cff1c4259d7 | 112 | |
| Kojto | 101:7cff1c4259d7 | 113 | /** @defgroup RNG_Exported_Constants_Group1 RNG Interrupt definition | 
| Kojto | 101:7cff1c4259d7 | 114 | * @{ | 
| Kojto | 101:7cff1c4259d7 | 115 | */ | 
| Kojto | 101:7cff1c4259d7 | 116 | #define RNG_IT_DRDY RNG_SR_DRDY /*!< Data Ready interrupt */ | 
| Kojto | 101:7cff1c4259d7 | 117 | #define RNG_IT_CEI RNG_SR_CEIS /*!< Clock error interrupt */ | 
| Kojto | 101:7cff1c4259d7 | 118 | #define RNG_IT_SEI RNG_SR_SEIS /*!< Seed error interrupt */ | 
| Kojto | 101:7cff1c4259d7 | 119 | /** | 
| Kojto | 101:7cff1c4259d7 | 120 | * @} | 
| Kojto | 101:7cff1c4259d7 | 121 | */ | 
| Kojto | 101:7cff1c4259d7 | 122 | |
| Kojto | 101:7cff1c4259d7 | 123 | /** @defgroup RNG_Exported_Constants_Group2 RNG Flag definition | 
| Kojto | 101:7cff1c4259d7 | 124 | * @{ | 
| Kojto | 101:7cff1c4259d7 | 125 | */ | 
| Kojto | 101:7cff1c4259d7 | 126 | #define RNG_FLAG_DRDY RNG_SR_DRDY /*!< Data ready */ | 
| Kojto | 101:7cff1c4259d7 | 127 | #define RNG_FLAG_CECS RNG_SR_CECS /*!< Clock error current status */ | 
| Kojto | 101:7cff1c4259d7 | 128 | #define RNG_FLAG_SECS RNG_SR_SECS /*!< Seed error current status */ | 
| Kojto | 101:7cff1c4259d7 | 129 | |
| Kojto | 101:7cff1c4259d7 | 130 | /** | 
| Kojto | 101:7cff1c4259d7 | 131 | * @} | 
| Kojto | 101:7cff1c4259d7 | 132 | */ | 
| Kojto | 101:7cff1c4259d7 | 133 | |
| Kojto | 101:7cff1c4259d7 | 134 | /** | 
| Kojto | 101:7cff1c4259d7 | 135 | * @} | 
| Kojto | 101:7cff1c4259d7 | 136 | */ | 
| Kojto | 101:7cff1c4259d7 | 137 | |
| Kojto | 101:7cff1c4259d7 | 138 | /* Exported macros -----------------------------------------------------------*/ | 
| Kojto | 101:7cff1c4259d7 | 139 | |
| Kojto | 101:7cff1c4259d7 | 140 | /** @defgroup RNG_Exported_Macros RNG Exported Macros | 
| Kojto | 101:7cff1c4259d7 | 141 | * @{ | 
| Kojto | 101:7cff1c4259d7 | 142 | */ | 
| Kojto | 101:7cff1c4259d7 | 143 | |
| Kojto | 101:7cff1c4259d7 | 144 | /** @brief Reset RNG handle state | 
| Kojto | 101:7cff1c4259d7 | 145 | * @param __HANDLE__: RNG Handle | 
| Kojto | 101:7cff1c4259d7 | 146 | * @retval None | 
| Kojto | 101:7cff1c4259d7 | 147 | */ | 
| Kojto | 101:7cff1c4259d7 | 148 | #define __HAL_RNG_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_RNG_STATE_RESET) | 
| Kojto | 101:7cff1c4259d7 | 149 | |
| Kojto | 101:7cff1c4259d7 | 150 | /** | 
| Kojto | 101:7cff1c4259d7 | 151 | * @brief Enables the RNG peripheral. | 
| Kojto | 101:7cff1c4259d7 | 152 | * @param __HANDLE__: RNG Handle | 
| Kojto | 101:7cff1c4259d7 | 153 | * @retval None | 
| Kojto | 101:7cff1c4259d7 | 154 | */ | 
| Kojto | 101:7cff1c4259d7 | 155 | #define __HAL_RNG_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR |= RNG_CR_RNGEN) | 
| Kojto | 101:7cff1c4259d7 | 156 | |
| Kojto | 101:7cff1c4259d7 | 157 | /** | 
| Kojto | 101:7cff1c4259d7 | 158 | * @brief Disables the RNG peripheral. | 
| Kojto | 101:7cff1c4259d7 | 159 | * @param __HANDLE__: RNG Handle | 
| Kojto | 101:7cff1c4259d7 | 160 | * @retval None | 
| Kojto | 101:7cff1c4259d7 | 161 | */ | 
| Kojto | 101:7cff1c4259d7 | 162 | #define __HAL_RNG_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR &= ~RNG_CR_RNGEN) | 
| Kojto | 101:7cff1c4259d7 | 163 | |
| Kojto | 101:7cff1c4259d7 | 164 | /** | 
| Kojto | 101:7cff1c4259d7 | 165 | * @brief Check the selected RNG flag status. | 
| Kojto | 101:7cff1c4259d7 | 166 | * @param __HANDLE__: RNG Handle | 
| Kojto | 101:7cff1c4259d7 | 167 | * @param __FLAG__: RNG flag | 
| Kojto | 101:7cff1c4259d7 | 168 | * This parameter can be one of the following values: | 
| Kojto | 101:7cff1c4259d7 | 169 | * @arg RNG_FLAG_DRDY: Data ready | 
| Kojto | 101:7cff1c4259d7 | 170 | * @arg RNG_FLAG_CECS: Clock error current status | 
| Kojto | 101:7cff1c4259d7 | 171 | * @arg RNG_FLAG_SECS: Seed error current status | 
| Kojto | 101:7cff1c4259d7 | 172 | * @retval The new state of __FLAG__ (SET or RESET). | 
| Kojto | 101:7cff1c4259d7 | 173 | */ | 
| Kojto | 101:7cff1c4259d7 | 174 | #define __HAL_RNG_GET_FLAG(__HANDLE__, __FLAG__) (((__HANDLE__)->Instance->SR & (__FLAG__)) == (__FLAG__)) | 
| Kojto | 101:7cff1c4259d7 | 175 | |
| Kojto | 101:7cff1c4259d7 | 176 | /** | 
| Kojto | 101:7cff1c4259d7 | 177 | * @brief Clears the selected RNG flag status. | 
| Kojto | 101:7cff1c4259d7 | 178 | * @param __HANDLE__: RNG handle | 
| Kojto | 101:7cff1c4259d7 | 179 | * @param __FLAG__: RNG flag to clear | 
| Kojto | 101:7cff1c4259d7 | 180 | * @note WARNING: This is a dummy macro for HAL code alignment, | 
| Kojto | 101:7cff1c4259d7 | 181 | * flags RNG_FLAG_DRDY, RNG_FLAG_CECS and RNG_FLAG_SECS are read-only. | 
| Kojto | 101:7cff1c4259d7 | 182 | * @retval None | 
| Kojto | 101:7cff1c4259d7 | 183 | */ | 
| Kojto | 101:7cff1c4259d7 | 184 | #define __HAL_RNG_CLEAR_FLAG(__HANDLE__, __FLAG__) /* dummy macro */ | 
| Kojto | 101:7cff1c4259d7 | 185 | |
| Kojto | 101:7cff1c4259d7 | 186 | |
| Kojto | 101:7cff1c4259d7 | 187 | |
| Kojto | 101:7cff1c4259d7 | 188 | /** | 
| Kojto | 101:7cff1c4259d7 | 189 | * @brief Enables the RNG interrupts. | 
| Kojto | 101:7cff1c4259d7 | 190 | * @param __HANDLE__: RNG Handle | 
| Kojto | 101:7cff1c4259d7 | 191 | * @retval None | 
| Kojto | 101:7cff1c4259d7 | 192 | */ | 
| Kojto | 101:7cff1c4259d7 | 193 | #define __HAL_RNG_ENABLE_IT(__HANDLE__) ((__HANDLE__)->Instance->CR |= RNG_CR_IE) | 
| Kojto | 101:7cff1c4259d7 | 194 | |
| Kojto | 101:7cff1c4259d7 | 195 | /** | 
| Kojto | 101:7cff1c4259d7 | 196 | * @brief Disables the RNG interrupts. | 
| Kojto | 101:7cff1c4259d7 | 197 | * @param __HANDLE__: RNG Handle | 
| Kojto | 101:7cff1c4259d7 | 198 | * @retval None | 
| Kojto | 101:7cff1c4259d7 | 199 | */ | 
| Kojto | 101:7cff1c4259d7 | 200 | #define __HAL_RNG_DISABLE_IT(__HANDLE__) ((__HANDLE__)->Instance->CR &= ~RNG_CR_IE) | 
| Kojto | 101:7cff1c4259d7 | 201 | |
| Kojto | 101:7cff1c4259d7 | 202 | /** | 
| Kojto | 101:7cff1c4259d7 | 203 | * @brief Checks whether the specified RNG interrupt has occurred or not. | 
| Kojto | 101:7cff1c4259d7 | 204 | * @param __HANDLE__: RNG Handle | 
| Kojto | 101:7cff1c4259d7 | 205 | * @param __INTERRUPT__: specifies the RNG interrupt status flag to check. | 
| Kojto | 101:7cff1c4259d7 | 206 | * This parameter can be one of the following values: | 
| Kojto | 101:7cff1c4259d7 | 207 | * @arg RNG_IT_DRDY: Data ready interrupt | 
| Kojto | 101:7cff1c4259d7 | 208 | * @arg RNG_IT_CEI: Clock error interrupt | 
| Kojto | 101:7cff1c4259d7 | 209 | * @arg RNG_IT_SEI: Seed error interrupt | 
| Kojto | 101:7cff1c4259d7 | 210 | * @retval The new state of __INTERRUPT__ (SET or RESET). | 
| Kojto | 101:7cff1c4259d7 | 211 | */ | 
| Kojto | 101:7cff1c4259d7 | 212 | #define __HAL_RNG_GET_IT(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->Instance->SR & (__INTERRUPT__)) == (__INTERRUPT__)) | 
| Kojto | 101:7cff1c4259d7 | 213 | |
| Kojto | 101:7cff1c4259d7 | 214 | /** | 
| Kojto | 101:7cff1c4259d7 | 215 | * @brief Clear the RNG interrupt status flags. | 
| Kojto | 101:7cff1c4259d7 | 216 | * @param __HANDLE__: RNG Handle | 
| Kojto | 101:7cff1c4259d7 | 217 | * @param __INTERRUPT__: specifies the RNG interrupt status flag to clear. | 
| Kojto | 101:7cff1c4259d7 | 218 | * This parameter can be one of the following values: | 
| Kojto | 101:7cff1c4259d7 | 219 | * @arg RNG_IT_CEI: Clock error interrupt | 
| Kojto | 101:7cff1c4259d7 | 220 | * @arg RNG_IT_SEI: Seed error interrupt | 
| Kojto | 101:7cff1c4259d7 | 221 | * @note RNG_IT_DRDY flag is read-only, reading RNG_DR register automatically clears RNG_IT_DRDY. | 
| Kojto | 101:7cff1c4259d7 | 222 | * @retval None | 
| Kojto | 101:7cff1c4259d7 | 223 | */ | 
| Kojto | 101:7cff1c4259d7 | 224 | #define __HAL_RNG_CLEAR_IT(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->Instance->SR) = ~(__INTERRUPT__)) | 
| Kojto | 101:7cff1c4259d7 | 225 | |
| Kojto | 101:7cff1c4259d7 | 226 | /** | 
| Kojto | 101:7cff1c4259d7 | 227 | * @} | 
| Kojto | 101:7cff1c4259d7 | 228 | */ | 
| Kojto | 101:7cff1c4259d7 | 229 | |
| Kojto | 101:7cff1c4259d7 | 230 | /* Exported functions --------------------------------------------------------*/ | 
| Kojto | 101:7cff1c4259d7 | 231 | /** @defgroup RNG_Exported_Functions RNG Exported Functions | 
| Kojto | 101:7cff1c4259d7 | 232 | * @{ | 
| Kojto | 101:7cff1c4259d7 | 233 | */ | 
| Kojto | 101:7cff1c4259d7 | 234 | |
| Kojto | 101:7cff1c4259d7 | 235 | /** @defgroup RNG_Exported_Functions_Group1 Initialization and de-initialization functions | 
| Kojto | 101:7cff1c4259d7 | 236 | * @{ | 
| Kojto | 101:7cff1c4259d7 | 237 | */ | 
| Kojto | 101:7cff1c4259d7 | 238 | HAL_StatusTypeDef HAL_RNG_Init(RNG_HandleTypeDef *hrng); | 
| Kojto | 101:7cff1c4259d7 | 239 | HAL_StatusTypeDef HAL_RNG_DeInit (RNG_HandleTypeDef *hrng); | 
| Kojto | 101:7cff1c4259d7 | 240 | void HAL_RNG_MspInit(RNG_HandleTypeDef *hrng); | 
| Kojto | 101:7cff1c4259d7 | 241 | void HAL_RNG_MspDeInit(RNG_HandleTypeDef *hrng); | 
| Kojto | 101:7cff1c4259d7 | 242 | |
| Kojto | 101:7cff1c4259d7 | 243 | /** | 
| Kojto | 101:7cff1c4259d7 | 244 | * @} | 
| Kojto | 101:7cff1c4259d7 | 245 | */ | 
| Kojto | 101:7cff1c4259d7 | 246 | |
| Kojto | 101:7cff1c4259d7 | 247 | /** @defgroup RNG_Exported_Functions_Group2 Peripheral Control functions | 
| Kojto | 101:7cff1c4259d7 | 248 | * @{ | 
| Kojto | 101:7cff1c4259d7 | 249 | */ | 
| Kojto | 101:7cff1c4259d7 | 250 | uint32_t HAL_RNG_GetRandomNumber(RNG_HandleTypeDef *hrng); /* Obsolete, use HAL_RNG_GenerateRandomNumber() instead */ | 
| Kojto | 101:7cff1c4259d7 | 251 | uint32_t HAL_RNG_GetRandomNumber_IT(RNG_HandleTypeDef *hrng); /* Obsolete, use HAL_RNG_GenerateRandomNumber_IT() instead */ | 
| Kojto | 101:7cff1c4259d7 | 252 | |
| Kojto | 101:7cff1c4259d7 | 253 | HAL_StatusTypeDef HAL_RNG_GenerateRandomNumber(RNG_HandleTypeDef *hrng, uint32_t *random32bit); | 
| Kojto | 101:7cff1c4259d7 | 254 | HAL_StatusTypeDef HAL_RNG_GenerateRandomNumber_IT(RNG_HandleTypeDef *hrng); | 
| Kojto | 101:7cff1c4259d7 | 255 | uint32_t HAL_RNG_ReadLastRandomNumber(RNG_HandleTypeDef *hrng); | 
| Kojto | 101:7cff1c4259d7 | 256 | |
| Kojto | 101:7cff1c4259d7 | 257 | void HAL_RNG_IRQHandler(RNG_HandleTypeDef *hrng); | 
| Kojto | 101:7cff1c4259d7 | 258 | void HAL_RNG_ErrorCallback(RNG_HandleTypeDef *hrng); | 
| Kojto | 101:7cff1c4259d7 | 259 | void HAL_RNG_ReadyDataCallback(RNG_HandleTypeDef* hrng, uint32_t random32bit); | 
| Kojto | 101:7cff1c4259d7 | 260 | |
| Kojto | 101:7cff1c4259d7 | 261 | /** | 
| Kojto | 101:7cff1c4259d7 | 262 | * @} | 
| Kojto | 101:7cff1c4259d7 | 263 | */ | 
| Kojto | 101:7cff1c4259d7 | 264 | |
| Kojto | 101:7cff1c4259d7 | 265 | /** @defgroup RNG_Exported_Functions_Group3 Peripheral State functions | 
| Kojto | 101:7cff1c4259d7 | 266 | * @{ | 
| Kojto | 101:7cff1c4259d7 | 267 | */ | 
| Kojto | 101:7cff1c4259d7 | 268 | HAL_RNG_StateTypeDef HAL_RNG_GetState(RNG_HandleTypeDef *hrng); | 
| Kojto | 101:7cff1c4259d7 | 269 | |
| Kojto | 101:7cff1c4259d7 | 270 | /** | 
| Kojto | 101:7cff1c4259d7 | 271 | * @} | 
| Kojto | 101:7cff1c4259d7 | 272 | */ | 
| Kojto | 101:7cff1c4259d7 | 273 | |
| Kojto | 101:7cff1c4259d7 | 274 | /** | 
| Kojto | 101:7cff1c4259d7 | 275 | * @} | 
| Kojto | 101:7cff1c4259d7 | 276 | */ | 
| Kojto | 101:7cff1c4259d7 | 277 | |
| Kojto | 101:7cff1c4259d7 | 278 | /* Private types -------------------------------------------------------------*/ | 
| Kojto | 101:7cff1c4259d7 | 279 | /** @defgroup RNG_Private_Types RNG Private Types | 
| Kojto | 101:7cff1c4259d7 | 280 | * @{ | 
| Kojto | 101:7cff1c4259d7 | 281 | */ | 
| Kojto | 101:7cff1c4259d7 | 282 | |
| Kojto | 101:7cff1c4259d7 | 283 | /** | 
| Kojto | 101:7cff1c4259d7 | 284 | * @} | 
| Kojto | 101:7cff1c4259d7 | 285 | */ | 
| Kojto | 101:7cff1c4259d7 | 286 | |
| Kojto | 101:7cff1c4259d7 | 287 | /* Private defines -----------------------------------------------------------*/ | 
| Kojto | 101:7cff1c4259d7 | 288 | /** @defgroup RNG_Private_Defines RNG Private Defines | 
| Kojto | 101:7cff1c4259d7 | 289 | * @{ | 
| Kojto | 101:7cff1c4259d7 | 290 | */ | 
| Kojto | 101:7cff1c4259d7 | 291 | |
| Kojto | 101:7cff1c4259d7 | 292 | /** | 
| Kojto | 101:7cff1c4259d7 | 293 | * @} | 
| Kojto | 101:7cff1c4259d7 | 294 | */ | 
| Kojto | 101:7cff1c4259d7 | 295 | |
| Kojto | 101:7cff1c4259d7 | 296 | /* Private variables ---------------------------------------------------------*/ | 
| Kojto | 101:7cff1c4259d7 | 297 | /** @defgroup RNG_Private_Variables RNG Private Variables | 
| Kojto | 101:7cff1c4259d7 | 298 | * @{ | 
| Kojto | 101:7cff1c4259d7 | 299 | */ | 
| Kojto | 101:7cff1c4259d7 | 300 | |
| Kojto | 101:7cff1c4259d7 | 301 | /** | 
| Kojto | 101:7cff1c4259d7 | 302 | * @} | 
| Kojto | 101:7cff1c4259d7 | 303 | */ | 
| Kojto | 101:7cff1c4259d7 | 304 | |
| Kojto | 101:7cff1c4259d7 | 305 | /* Private constants ---------------------------------------------------------*/ | 
| Kojto | 101:7cff1c4259d7 | 306 | /** @defgroup RNG_Private_Constants RNG Private Constants | 
| Kojto | 101:7cff1c4259d7 | 307 | * @{ | 
| Kojto | 101:7cff1c4259d7 | 308 | */ | 
| Kojto | 101:7cff1c4259d7 | 309 | |
| Kojto | 101:7cff1c4259d7 | 310 | /** | 
| Kojto | 101:7cff1c4259d7 | 311 | * @} | 
| Kojto | 101:7cff1c4259d7 | 312 | */ | 
| Kojto | 101:7cff1c4259d7 | 313 | |
| Kojto | 101:7cff1c4259d7 | 314 | /* Private macros ------------------------------------------------------------*/ | 
| Kojto | 101:7cff1c4259d7 | 315 | /** @defgroup RNG_Private_Macros RNG Private Macros | 
| Kojto | 101:7cff1c4259d7 | 316 | * @{ | 
| Kojto | 101:7cff1c4259d7 | 317 | */ | 
| Kojto | 101:7cff1c4259d7 | 318 | #define IS_RNG_IT(IT) (((IT) == RNG_IT_CEI) || \ | 
| Kojto | 101:7cff1c4259d7 | 319 | ((IT) == RNG_IT_SEI)) | 
| Kojto | 101:7cff1c4259d7 | 320 | |
| Kojto | 101:7cff1c4259d7 | 321 | #define IS_RNG_FLAG(FLAG) (((FLAG) == RNG_FLAG_DRDY) || \ | 
| Kojto | 101:7cff1c4259d7 | 322 | ((FLAG) == RNG_FLAG_CECS) || \ | 
| Kojto | 101:7cff1c4259d7 | 323 | ((FLAG) == RNG_FLAG_SECS)) | 
| Kojto | 101:7cff1c4259d7 | 324 | |
| Kojto | 101:7cff1c4259d7 | 325 | /** | 
| Kojto | 101:7cff1c4259d7 | 326 | * @} | 
| Kojto | 101:7cff1c4259d7 | 327 | */ | 
| Kojto | 101:7cff1c4259d7 | 328 | |
| Kojto | 101:7cff1c4259d7 | 329 | /* Private functions prototypes ----------------------------------------------*/ | 
| Kojto | 101:7cff1c4259d7 | 330 | /** @defgroup RNG_Private_Functions_Prototypes RNG Private Functions Prototypes | 
| Kojto | 101:7cff1c4259d7 | 331 | * @{ | 
| Kojto | 101:7cff1c4259d7 | 332 | */ | 
| Kojto | 101:7cff1c4259d7 | 333 | |
| Kojto | 101:7cff1c4259d7 | 334 | /** | 
| Kojto | 101:7cff1c4259d7 | 335 | * @} | 
| Kojto | 101:7cff1c4259d7 | 336 | */ | 
| Kojto | 101:7cff1c4259d7 | 337 | |
| Kojto | 101:7cff1c4259d7 | 338 | /* Private functions ---------------------------------------------------------*/ | 
| Kojto | 101:7cff1c4259d7 | 339 | /** @defgroup RNG_Private_Functions RNG Private Functions | 
| Kojto | 101:7cff1c4259d7 | 340 | * @{ | 
| Kojto | 101:7cff1c4259d7 | 341 | */ | 
| Kojto | 101:7cff1c4259d7 | 342 | |
| Kojto | 101:7cff1c4259d7 | 343 | /** | 
| Kojto | 101:7cff1c4259d7 | 344 | * @} | 
| Kojto | 101:7cff1c4259d7 | 345 | */ | 
| Kojto | 101:7cff1c4259d7 | 346 | |
| Kojto | 101:7cff1c4259d7 | 347 | /** | 
| Kojto | 101:7cff1c4259d7 | 348 | * @} | 
| Kojto | 101:7cff1c4259d7 | 349 | */ | 
| Kojto | 101:7cff1c4259d7 | 350 | |
| Kojto | 101:7cff1c4259d7 | 351 | /** | 
| Kojto | 101:7cff1c4259d7 | 352 | * @} | 
| Kojto | 101:7cff1c4259d7 | 353 | */ | 
| Kojto | 101:7cff1c4259d7 | 354 | |
| Kojto | 101:7cff1c4259d7 | 355 | #endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx */ | 
| Kojto | 101:7cff1c4259d7 | 356 | |
| Kojto | 101:7cff1c4259d7 | 357 | #ifdef __cplusplus | 
| Kojto | 101:7cff1c4259d7 | 358 | } | 
| Kojto | 101:7cff1c4259d7 | 359 | #endif | 
| Kojto | 101:7cff1c4259d7 | 360 | |
| Kojto | 101:7cff1c4259d7 | 361 | |
| Kojto | 101:7cff1c4259d7 | 362 | #endif /* __STM32F4xx_HAL_RNG_H */ | 
| Kojto | 101:7cff1c4259d7 | 363 | |
| Kojto | 101:7cff1c4259d7 | 364 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ | 


