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