001

Committer:
ganlikun
Date:
Sun Jun 12 14:02:44 2022 +0000
Revision:
0:13413ea9a877
00

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ganlikun 0:13413ea9a877 1 /**
ganlikun 0:13413ea9a877 2 ******************************************************************************
ganlikun 0:13413ea9a877 3 * @file stm32f4xx_ll_iwdg.h
ganlikun 0:13413ea9a877 4 * @author MCD Application Team
ganlikun 0:13413ea9a877 5 * @version V1.7.1
ganlikun 0:13413ea9a877 6 * @date 14-April-2017
ganlikun 0:13413ea9a877 7 * @brief Header file of IWDG LL module.
ganlikun 0:13413ea9a877 8 ******************************************************************************
ganlikun 0:13413ea9a877 9 * @attention
ganlikun 0:13413ea9a877 10 *
ganlikun 0:13413ea9a877 11 * <h2><center>&copy; COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
ganlikun 0:13413ea9a877 12 *
ganlikun 0:13413ea9a877 13 * Redistribution and use in source and binary forms, with or without modification,
ganlikun 0:13413ea9a877 14 * are permitted provided that the following conditions are met:
ganlikun 0:13413ea9a877 15 * 1. Redistributions of source code must retain the above copyright notice,
ganlikun 0:13413ea9a877 16 * this list of conditions and the following disclaimer.
ganlikun 0:13413ea9a877 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
ganlikun 0:13413ea9a877 18 * this list of conditions and the following disclaimer in the documentation
ganlikun 0:13413ea9a877 19 * and/or other materials provided with the distribution.
ganlikun 0:13413ea9a877 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
ganlikun 0:13413ea9a877 21 * may be used to endorse or promote products derived from this software
ganlikun 0:13413ea9a877 22 * without specific prior written permission.
ganlikun 0:13413ea9a877 23 *
ganlikun 0:13413ea9a877 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
ganlikun 0:13413ea9a877 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
ganlikun 0:13413ea9a877 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
ganlikun 0:13413ea9a877 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
ganlikun 0:13413ea9a877 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
ganlikun 0:13413ea9a877 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
ganlikun 0:13413ea9a877 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
ganlikun 0:13413ea9a877 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
ganlikun 0:13413ea9a877 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
ganlikun 0:13413ea9a877 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
ganlikun 0:13413ea9a877 34 *
ganlikun 0:13413ea9a877 35 ******************************************************************************
ganlikun 0:13413ea9a877 36 */
ganlikun 0:13413ea9a877 37
ganlikun 0:13413ea9a877 38 /* Define to prevent recursive inclusion -------------------------------------*/
ganlikun 0:13413ea9a877 39 #ifndef __STM32F4xx_LL_IWDG_H
ganlikun 0:13413ea9a877 40 #define __STM32F4xx_LL_IWDG_H
ganlikun 0:13413ea9a877 41
ganlikun 0:13413ea9a877 42 #ifdef __cplusplus
ganlikun 0:13413ea9a877 43 extern "C" {
ganlikun 0:13413ea9a877 44 #endif
ganlikun 0:13413ea9a877 45
ganlikun 0:13413ea9a877 46 /* Includes ------------------------------------------------------------------*/
ganlikun 0:13413ea9a877 47 #include "stm32f4xx.h"
ganlikun 0:13413ea9a877 48
ganlikun 0:13413ea9a877 49 /** @addtogroup STM32F4xx_LL_Driver
ganlikun 0:13413ea9a877 50 * @{
ganlikun 0:13413ea9a877 51 */
ganlikun 0:13413ea9a877 52
ganlikun 0:13413ea9a877 53 #if defined(IWDG)
ganlikun 0:13413ea9a877 54
ganlikun 0:13413ea9a877 55 /** @defgroup IWDG_LL IWDG
ganlikun 0:13413ea9a877 56 * @{
ganlikun 0:13413ea9a877 57 */
ganlikun 0:13413ea9a877 58
ganlikun 0:13413ea9a877 59 /* Private types -------------------------------------------------------------*/
ganlikun 0:13413ea9a877 60 /* Private variables ---------------------------------------------------------*/
ganlikun 0:13413ea9a877 61
ganlikun 0:13413ea9a877 62 /* Private constants ---------------------------------------------------------*/
ganlikun 0:13413ea9a877 63 /** @defgroup IWDG_LL_Private_Constants IWDG Private Constants
ganlikun 0:13413ea9a877 64 * @{
ganlikun 0:13413ea9a877 65 */
ganlikun 0:13413ea9a877 66
ganlikun 0:13413ea9a877 67 #define LL_IWDG_KEY_RELOAD 0x0000AAAAU /*!< IWDG Reload Counter Enable */
ganlikun 0:13413ea9a877 68 #define LL_IWDG_KEY_ENABLE 0x0000CCCCU /*!< IWDG Peripheral Enable */
ganlikun 0:13413ea9a877 69 #define LL_IWDG_KEY_WR_ACCESS_ENABLE 0x00005555U /*!< IWDG KR Write Access Enable */
ganlikun 0:13413ea9a877 70 #define LL_IWDG_KEY_WR_ACCESS_DISABLE 0x00000000U /*!< IWDG KR Write Access Disable */
ganlikun 0:13413ea9a877 71
ganlikun 0:13413ea9a877 72 /**
ganlikun 0:13413ea9a877 73 * @}
ganlikun 0:13413ea9a877 74 */
ganlikun 0:13413ea9a877 75
ganlikun 0:13413ea9a877 76 /* Private macros ------------------------------------------------------------*/
ganlikun 0:13413ea9a877 77
ganlikun 0:13413ea9a877 78 /* Exported types ------------------------------------------------------------*/
ganlikun 0:13413ea9a877 79 /* Exported constants --------------------------------------------------------*/
ganlikun 0:13413ea9a877 80 /** @defgroup IWDG_LL_Exported_Constants IWDG Exported Constants
ganlikun 0:13413ea9a877 81 * @{
ganlikun 0:13413ea9a877 82 */
ganlikun 0:13413ea9a877 83
ganlikun 0:13413ea9a877 84 /** @defgroup IWDG_LL_EC_GET_FLAG Get Flags Defines
ganlikun 0:13413ea9a877 85 * @brief Flags defines which can be used with LL_IWDG_ReadReg function
ganlikun 0:13413ea9a877 86 * @{
ganlikun 0:13413ea9a877 87 */
ganlikun 0:13413ea9a877 88 #define LL_IWDG_SR_PVU IWDG_SR_PVU /*!< Watchdog prescaler value update */
ganlikun 0:13413ea9a877 89 #define LL_IWDG_SR_RVU IWDG_SR_RVU /*!< Watchdog counter reload value update */
ganlikun 0:13413ea9a877 90
ganlikun 0:13413ea9a877 91 /**
ganlikun 0:13413ea9a877 92 * @}
ganlikun 0:13413ea9a877 93 */
ganlikun 0:13413ea9a877 94
ganlikun 0:13413ea9a877 95 /** @defgroup IWDG_LL_EC_PRESCALER Prescaler Divider
ganlikun 0:13413ea9a877 96 * @{
ganlikun 0:13413ea9a877 97 */
ganlikun 0:13413ea9a877 98 #define LL_IWDG_PRESCALER_4 0x00000000U /*!< Divider by 4 */
ganlikun 0:13413ea9a877 99 #define LL_IWDG_PRESCALER_8 (IWDG_PR_PR_0) /*!< Divider by 8 */
ganlikun 0:13413ea9a877 100 #define LL_IWDG_PRESCALER_16 (IWDG_PR_PR_1) /*!< Divider by 16 */
ganlikun 0:13413ea9a877 101 #define LL_IWDG_PRESCALER_32 (IWDG_PR_PR_1 | IWDG_PR_PR_0) /*!< Divider by 32 */
ganlikun 0:13413ea9a877 102 #define LL_IWDG_PRESCALER_64 (IWDG_PR_PR_2) /*!< Divider by 64 */
ganlikun 0:13413ea9a877 103 #define LL_IWDG_PRESCALER_128 (IWDG_PR_PR_2 | IWDG_PR_PR_0) /*!< Divider by 128 */
ganlikun 0:13413ea9a877 104 #define LL_IWDG_PRESCALER_256 (IWDG_PR_PR_2 | IWDG_PR_PR_1) /*!< Divider by 256 */
ganlikun 0:13413ea9a877 105 /**
ganlikun 0:13413ea9a877 106 * @}
ganlikun 0:13413ea9a877 107 */
ganlikun 0:13413ea9a877 108
ganlikun 0:13413ea9a877 109 /**
ganlikun 0:13413ea9a877 110 * @}
ganlikun 0:13413ea9a877 111 */
ganlikun 0:13413ea9a877 112
ganlikun 0:13413ea9a877 113 /* Exported macro ------------------------------------------------------------*/
ganlikun 0:13413ea9a877 114 /** @defgroup IWDG_LL_Exported_Macros IWDG Exported Macros
ganlikun 0:13413ea9a877 115 * @{
ganlikun 0:13413ea9a877 116 */
ganlikun 0:13413ea9a877 117
ganlikun 0:13413ea9a877 118 /** @defgroup IWDG_LL_EM_WRITE_READ Common Write and read registers Macros
ganlikun 0:13413ea9a877 119 * @{
ganlikun 0:13413ea9a877 120 */
ganlikun 0:13413ea9a877 121
ganlikun 0:13413ea9a877 122 /**
ganlikun 0:13413ea9a877 123 * @brief Write a value in IWDG register
ganlikun 0:13413ea9a877 124 * @param __INSTANCE__ IWDG Instance
ganlikun 0:13413ea9a877 125 * @param __REG__ Register to be written
ganlikun 0:13413ea9a877 126 * @param __VALUE__ Value to be written in the register
ganlikun 0:13413ea9a877 127 * @retval None
ganlikun 0:13413ea9a877 128 */
ganlikun 0:13413ea9a877 129 #define LL_IWDG_WriteReg(__INSTANCE__, __REG__, __VALUE__) WRITE_REG(__INSTANCE__->__REG__, (__VALUE__))
ganlikun 0:13413ea9a877 130
ganlikun 0:13413ea9a877 131 /**
ganlikun 0:13413ea9a877 132 * @brief Read a value in IWDG register
ganlikun 0:13413ea9a877 133 * @param __INSTANCE__ IWDG Instance
ganlikun 0:13413ea9a877 134 * @param __REG__ Register to be read
ganlikun 0:13413ea9a877 135 * @retval Register value
ganlikun 0:13413ea9a877 136 */
ganlikun 0:13413ea9a877 137 #define LL_IWDG_ReadReg(__INSTANCE__, __REG__) READ_REG(__INSTANCE__->__REG__)
ganlikun 0:13413ea9a877 138 /**
ganlikun 0:13413ea9a877 139 * @}
ganlikun 0:13413ea9a877 140 */
ganlikun 0:13413ea9a877 141
ganlikun 0:13413ea9a877 142 /**
ganlikun 0:13413ea9a877 143 * @}
ganlikun 0:13413ea9a877 144 */
ganlikun 0:13413ea9a877 145
ganlikun 0:13413ea9a877 146
ganlikun 0:13413ea9a877 147 /* Exported functions --------------------------------------------------------*/
ganlikun 0:13413ea9a877 148 /** @defgroup IWDG_LL_Exported_Functions IWDG Exported Functions
ganlikun 0:13413ea9a877 149 * @{
ganlikun 0:13413ea9a877 150 */
ganlikun 0:13413ea9a877 151 /** @defgroup IWDG_LL_EF_Configuration Configuration
ganlikun 0:13413ea9a877 152 * @{
ganlikun 0:13413ea9a877 153 */
ganlikun 0:13413ea9a877 154
ganlikun 0:13413ea9a877 155 /**
ganlikun 0:13413ea9a877 156 * @brief Start the Independent Watchdog
ganlikun 0:13413ea9a877 157 * @note Except if the hardware watchdog option is selected
ganlikun 0:13413ea9a877 158 * @rmtoll KR KEY LL_IWDG_Enable
ganlikun 0:13413ea9a877 159 * @param IWDGx IWDG Instance
ganlikun 0:13413ea9a877 160 * @retval None
ganlikun 0:13413ea9a877 161 */
ganlikun 0:13413ea9a877 162 __STATIC_INLINE void LL_IWDG_Enable(IWDG_TypeDef *IWDGx)
ganlikun 0:13413ea9a877 163 {
ganlikun 0:13413ea9a877 164 WRITE_REG(IWDG->KR, LL_IWDG_KEY_ENABLE);
ganlikun 0:13413ea9a877 165 }
ganlikun 0:13413ea9a877 166
ganlikun 0:13413ea9a877 167 /**
ganlikun 0:13413ea9a877 168 * @brief Reloads IWDG counter with value defined in the reload register
ganlikun 0:13413ea9a877 169 * @rmtoll KR KEY LL_IWDG_ReloadCounter
ganlikun 0:13413ea9a877 170 * @param IWDGx IWDG Instance
ganlikun 0:13413ea9a877 171 * @retval None
ganlikun 0:13413ea9a877 172 */
ganlikun 0:13413ea9a877 173 __STATIC_INLINE void LL_IWDG_ReloadCounter(IWDG_TypeDef *IWDGx)
ganlikun 0:13413ea9a877 174 {
ganlikun 0:13413ea9a877 175 WRITE_REG(IWDG->KR, LL_IWDG_KEY_RELOAD);
ganlikun 0:13413ea9a877 176 }
ganlikun 0:13413ea9a877 177
ganlikun 0:13413ea9a877 178 /**
ganlikun 0:13413ea9a877 179 * @brief Enable write access to IWDG_PR, IWDG_RLR and IWDG_WINR registers
ganlikun 0:13413ea9a877 180 * @rmtoll KR KEY LL_IWDG_EnableWriteAccess
ganlikun 0:13413ea9a877 181 * @param IWDGx IWDG Instance
ganlikun 0:13413ea9a877 182 * @retval None
ganlikun 0:13413ea9a877 183 */
ganlikun 0:13413ea9a877 184 __STATIC_INLINE void LL_IWDG_EnableWriteAccess(IWDG_TypeDef *IWDGx)
ganlikun 0:13413ea9a877 185 {
ganlikun 0:13413ea9a877 186 WRITE_REG(IWDG->KR, LL_IWDG_KEY_WR_ACCESS_ENABLE);
ganlikun 0:13413ea9a877 187 }
ganlikun 0:13413ea9a877 188
ganlikun 0:13413ea9a877 189 /**
ganlikun 0:13413ea9a877 190 * @brief Disable write access to IWDG_PR, IWDG_RLR and IWDG_WINR registers
ganlikun 0:13413ea9a877 191 * @rmtoll KR KEY LL_IWDG_DisableWriteAccess
ganlikun 0:13413ea9a877 192 * @param IWDGx IWDG Instance
ganlikun 0:13413ea9a877 193 * @retval None
ganlikun 0:13413ea9a877 194 */
ganlikun 0:13413ea9a877 195 __STATIC_INLINE void LL_IWDG_DisableWriteAccess(IWDG_TypeDef *IWDGx)
ganlikun 0:13413ea9a877 196 {
ganlikun 0:13413ea9a877 197 WRITE_REG(IWDG->KR, LL_IWDG_KEY_WR_ACCESS_DISABLE);
ganlikun 0:13413ea9a877 198 }
ganlikun 0:13413ea9a877 199
ganlikun 0:13413ea9a877 200 /**
ganlikun 0:13413ea9a877 201 * @brief Select the prescaler of the IWDG
ganlikun 0:13413ea9a877 202 * @rmtoll PR PR LL_IWDG_SetPrescaler
ganlikun 0:13413ea9a877 203 * @param IWDGx IWDG Instance
ganlikun 0:13413ea9a877 204 * @param Prescaler This parameter can be one of the following values:
ganlikun 0:13413ea9a877 205 * @arg @ref LL_IWDG_PRESCALER_4
ganlikun 0:13413ea9a877 206 * @arg @ref LL_IWDG_PRESCALER_8
ganlikun 0:13413ea9a877 207 * @arg @ref LL_IWDG_PRESCALER_16
ganlikun 0:13413ea9a877 208 * @arg @ref LL_IWDG_PRESCALER_32
ganlikun 0:13413ea9a877 209 * @arg @ref LL_IWDG_PRESCALER_64
ganlikun 0:13413ea9a877 210 * @arg @ref LL_IWDG_PRESCALER_128
ganlikun 0:13413ea9a877 211 * @arg @ref LL_IWDG_PRESCALER_256
ganlikun 0:13413ea9a877 212 * @retval None
ganlikun 0:13413ea9a877 213 */
ganlikun 0:13413ea9a877 214 __STATIC_INLINE void LL_IWDG_SetPrescaler(IWDG_TypeDef *IWDGx, uint32_t Prescaler)
ganlikun 0:13413ea9a877 215 {
ganlikun 0:13413ea9a877 216 WRITE_REG(IWDGx->PR, IWDG_PR_PR & Prescaler);
ganlikun 0:13413ea9a877 217 }
ganlikun 0:13413ea9a877 218
ganlikun 0:13413ea9a877 219 /**
ganlikun 0:13413ea9a877 220 * @brief Get the selected prescaler of the IWDG
ganlikun 0:13413ea9a877 221 * @rmtoll PR PR LL_IWDG_GetPrescaler
ganlikun 0:13413ea9a877 222 * @param IWDGx IWDG Instance
ganlikun 0:13413ea9a877 223 * @retval Returned value can be one of the following values:
ganlikun 0:13413ea9a877 224 * @arg @ref LL_IWDG_PRESCALER_4
ganlikun 0:13413ea9a877 225 * @arg @ref LL_IWDG_PRESCALER_8
ganlikun 0:13413ea9a877 226 * @arg @ref LL_IWDG_PRESCALER_16
ganlikun 0:13413ea9a877 227 * @arg @ref LL_IWDG_PRESCALER_32
ganlikun 0:13413ea9a877 228 * @arg @ref LL_IWDG_PRESCALER_64
ganlikun 0:13413ea9a877 229 * @arg @ref LL_IWDG_PRESCALER_128
ganlikun 0:13413ea9a877 230 * @arg @ref LL_IWDG_PRESCALER_256
ganlikun 0:13413ea9a877 231 */
ganlikun 0:13413ea9a877 232 __STATIC_INLINE uint32_t LL_IWDG_GetPrescaler(IWDG_TypeDef *IWDGx)
ganlikun 0:13413ea9a877 233 {
ganlikun 0:13413ea9a877 234 return (uint32_t)(READ_REG(IWDGx->PR));
ganlikun 0:13413ea9a877 235 }
ganlikun 0:13413ea9a877 236
ganlikun 0:13413ea9a877 237 /**
ganlikun 0:13413ea9a877 238 * @brief Specify the IWDG down-counter reload value
ganlikun 0:13413ea9a877 239 * @rmtoll RLR RL LL_IWDG_SetReloadCounter
ganlikun 0:13413ea9a877 240 * @param IWDGx IWDG Instance
ganlikun 0:13413ea9a877 241 * @param Counter Value between Min_Data=0 and Max_Data=0x0FFF
ganlikun 0:13413ea9a877 242 * @retval None
ganlikun 0:13413ea9a877 243 */
ganlikun 0:13413ea9a877 244 __STATIC_INLINE void LL_IWDG_SetReloadCounter(IWDG_TypeDef *IWDGx, uint32_t Counter)
ganlikun 0:13413ea9a877 245 {
ganlikun 0:13413ea9a877 246 WRITE_REG(IWDGx->RLR, IWDG_RLR_RL & Counter);
ganlikun 0:13413ea9a877 247 }
ganlikun 0:13413ea9a877 248
ganlikun 0:13413ea9a877 249 /**
ganlikun 0:13413ea9a877 250 * @brief Get the specified IWDG down-counter reload value
ganlikun 0:13413ea9a877 251 * @rmtoll RLR RL LL_IWDG_GetReloadCounter
ganlikun 0:13413ea9a877 252 * @param IWDGx IWDG Instance
ganlikun 0:13413ea9a877 253 * @retval Value between Min_Data=0 and Max_Data=0x0FFF
ganlikun 0:13413ea9a877 254 */
ganlikun 0:13413ea9a877 255 __STATIC_INLINE uint32_t LL_IWDG_GetReloadCounter(IWDG_TypeDef *IWDGx)
ganlikun 0:13413ea9a877 256 {
ganlikun 0:13413ea9a877 257 return (uint32_t)(READ_REG(IWDGx->RLR));
ganlikun 0:13413ea9a877 258 }
ganlikun 0:13413ea9a877 259
ganlikun 0:13413ea9a877 260
ganlikun 0:13413ea9a877 261 /**
ganlikun 0:13413ea9a877 262 * @}
ganlikun 0:13413ea9a877 263 */
ganlikun 0:13413ea9a877 264
ganlikun 0:13413ea9a877 265 /** @defgroup IWDG_LL_EF_FLAG_Management FLAG_Management
ganlikun 0:13413ea9a877 266 * @{
ganlikun 0:13413ea9a877 267 */
ganlikun 0:13413ea9a877 268
ganlikun 0:13413ea9a877 269 /**
ganlikun 0:13413ea9a877 270 * @brief Check if flag Prescaler Value Update is set or not
ganlikun 0:13413ea9a877 271 * @rmtoll SR PVU LL_IWDG_IsActiveFlag_PVU
ganlikun 0:13413ea9a877 272 * @param IWDGx IWDG Instance
ganlikun 0:13413ea9a877 273 * @retval State of bit (1 or 0).
ganlikun 0:13413ea9a877 274 */
ganlikun 0:13413ea9a877 275 __STATIC_INLINE uint32_t LL_IWDG_IsActiveFlag_PVU(IWDG_TypeDef *IWDGx)
ganlikun 0:13413ea9a877 276 {
ganlikun 0:13413ea9a877 277 return (READ_BIT(IWDGx->SR, IWDG_SR_PVU) == (IWDG_SR_PVU));
ganlikun 0:13413ea9a877 278 }
ganlikun 0:13413ea9a877 279
ganlikun 0:13413ea9a877 280 /**
ganlikun 0:13413ea9a877 281 * @brief Check if flag Reload Value Update is set or not
ganlikun 0:13413ea9a877 282 * @rmtoll SR RVU LL_IWDG_IsActiveFlag_RVU
ganlikun 0:13413ea9a877 283 * @param IWDGx IWDG Instance
ganlikun 0:13413ea9a877 284 * @retval State of bit (1 or 0).
ganlikun 0:13413ea9a877 285 */
ganlikun 0:13413ea9a877 286 __STATIC_INLINE uint32_t LL_IWDG_IsActiveFlag_RVU(IWDG_TypeDef *IWDGx)
ganlikun 0:13413ea9a877 287 {
ganlikun 0:13413ea9a877 288 return (READ_BIT(IWDGx->SR, IWDG_SR_RVU) == (IWDG_SR_RVU));
ganlikun 0:13413ea9a877 289 }
ganlikun 0:13413ea9a877 290
ganlikun 0:13413ea9a877 291
ganlikun 0:13413ea9a877 292 /**
ganlikun 0:13413ea9a877 293 * @brief Check if all flags Prescaler, Reload & Window Value Update are reset or not
ganlikun 0:13413ea9a877 294 * @rmtoll SR PVU LL_IWDG_IsReady\n
ganlikun 0:13413ea9a877 295 * SR RVU LL_IWDG_IsReady
ganlikun 0:13413ea9a877 296 * @param IWDGx IWDG Instance
ganlikun 0:13413ea9a877 297 * @retval State of bits (1 or 0).
ganlikun 0:13413ea9a877 298 */
ganlikun 0:13413ea9a877 299 __STATIC_INLINE uint32_t LL_IWDG_IsReady(IWDG_TypeDef *IWDGx)
ganlikun 0:13413ea9a877 300 {
ganlikun 0:13413ea9a877 301 return (READ_BIT(IWDGx->SR, IWDG_SR_PVU | IWDG_SR_RVU) == 0U);
ganlikun 0:13413ea9a877 302 }
ganlikun 0:13413ea9a877 303
ganlikun 0:13413ea9a877 304 /**
ganlikun 0:13413ea9a877 305 * @}
ganlikun 0:13413ea9a877 306 */
ganlikun 0:13413ea9a877 307
ganlikun 0:13413ea9a877 308
ganlikun 0:13413ea9a877 309 /**
ganlikun 0:13413ea9a877 310 * @}
ganlikun 0:13413ea9a877 311 */
ganlikun 0:13413ea9a877 312
ganlikun 0:13413ea9a877 313 /**
ganlikun 0:13413ea9a877 314 * @}
ganlikun 0:13413ea9a877 315 */
ganlikun 0:13413ea9a877 316
ganlikun 0:13413ea9a877 317 #endif /* IWDG) */
ganlikun 0:13413ea9a877 318
ganlikun 0:13413ea9a877 319 /**
ganlikun 0:13413ea9a877 320 * @}
ganlikun 0:13413ea9a877 321 */
ganlikun 0:13413ea9a877 322
ganlikun 0:13413ea9a877 323 #ifdef __cplusplus
ganlikun 0:13413ea9a877 324 }
ganlikun 0:13413ea9a877 325 #endif
ganlikun 0:13413ea9a877 326
ganlikun 0:13413ea9a877 327 #endif /* __STM32F4xx_LL_IWDG_H */
ganlikun 0:13413ea9a877 328
ganlikun 0:13413ea9a877 329 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
ganlikun 0:13413ea9a877 330