Initial commit

Dependencies:   FastPWM

Committer:
lypinator
Date:
Wed Sep 16 01:11:49 2020 +0000
Revision:
0:bb348c97df44
Added PWM

Who changed what in which revision?

UserRevisionLine numberNew contents of line
lypinator 0:bb348c97df44 1 /**
lypinator 0:bb348c97df44 2 ******************************************************************************
lypinator 0:bb348c97df44 3 * @file stm32f4xx_ll_wwdg.h
lypinator 0:bb348c97df44 4 * @author MCD Application Team
lypinator 0:bb348c97df44 5 * @brief Header file of WWDG LL module.
lypinator 0:bb348c97df44 6 ******************************************************************************
lypinator 0:bb348c97df44 7 * @attention
lypinator 0:bb348c97df44 8 *
lypinator 0:bb348c97df44 9 * <h2><center>&copy; 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_WWDG_H
lypinator 0:bb348c97df44 38 #define __STM32F4xx_LL_WWDG_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 (WWDG)
lypinator 0:bb348c97df44 52
lypinator 0:bb348c97df44 53 /** @defgroup WWDG_LL WWDG
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
lypinator 0:bb348c97df44 62 /* Private macros ------------------------------------------------------------*/
lypinator 0:bb348c97df44 63
lypinator 0:bb348c97df44 64 /* Exported types ------------------------------------------------------------*/
lypinator 0:bb348c97df44 65 /* Exported constants --------------------------------------------------------*/
lypinator 0:bb348c97df44 66 /** @defgroup WWDG_LL_Exported_Constants WWDG Exported Constants
lypinator 0:bb348c97df44 67 * @{
lypinator 0:bb348c97df44 68 */
lypinator 0:bb348c97df44 69
lypinator 0:bb348c97df44 70
lypinator 0:bb348c97df44 71 /** @defgroup WWDG_LL_EC_IT IT Defines
lypinator 0:bb348c97df44 72 * @brief IT defines which can be used with LL_WWDG_ReadReg and LL_WWDG_WriteReg functions
lypinator 0:bb348c97df44 73 * @{
lypinator 0:bb348c97df44 74 */
lypinator 0:bb348c97df44 75 #define LL_WWDG_CFR_EWI WWDG_CFR_EWI
lypinator 0:bb348c97df44 76 /**
lypinator 0:bb348c97df44 77 * @}
lypinator 0:bb348c97df44 78 */
lypinator 0:bb348c97df44 79
lypinator 0:bb348c97df44 80 /** @defgroup WWDG_LL_EC_PRESCALER PRESCALER
lypinator 0:bb348c97df44 81 * @{
lypinator 0:bb348c97df44 82 */
lypinator 0:bb348c97df44 83 #define LL_WWDG_PRESCALER_1 (uint32_t)0x00000000U /*!< WWDG counter clock = (PCLK1/4096)/1 */
lypinator 0:bb348c97df44 84 #define LL_WWDG_PRESCALER_2 WWDG_CFR_WDGTB_0 /*!< WWDG counter clock = (PCLK1/4096)/2 */
lypinator 0:bb348c97df44 85 #define LL_WWDG_PRESCALER_4 WWDG_CFR_WDGTB_1 /*!< WWDG counter clock = (PCLK1/4096)/4 */
lypinator 0:bb348c97df44 86 #define LL_WWDG_PRESCALER_8 (WWDG_CFR_WDGTB_0 | WWDG_CFR_WDGTB_1) /*!< WWDG counter clock = (PCLK1/4096)/8 */
lypinator 0:bb348c97df44 87 /**
lypinator 0:bb348c97df44 88 * @}
lypinator 0:bb348c97df44 89 */
lypinator 0:bb348c97df44 90
lypinator 0:bb348c97df44 91 /**
lypinator 0:bb348c97df44 92 * @}
lypinator 0:bb348c97df44 93 */
lypinator 0:bb348c97df44 94
lypinator 0:bb348c97df44 95 /* Exported macro ------------------------------------------------------------*/
lypinator 0:bb348c97df44 96 /** @defgroup WWDG_LL_Exported_Macros WWDG Exported Macros
lypinator 0:bb348c97df44 97 * @{
lypinator 0:bb348c97df44 98 */
lypinator 0:bb348c97df44 99 /** @defgroup WWDG_LL_EM_WRITE_READ Common Write and read registers macros
lypinator 0:bb348c97df44 100 * @{
lypinator 0:bb348c97df44 101 */
lypinator 0:bb348c97df44 102 /**
lypinator 0:bb348c97df44 103 * @brief Write a value in WWDG register
lypinator 0:bb348c97df44 104 * @param __INSTANCE__ WWDG Instance
lypinator 0:bb348c97df44 105 * @param __REG__ Register to be written
lypinator 0:bb348c97df44 106 * @param __VALUE__ Value to be written in the register
lypinator 0:bb348c97df44 107 * @retval None
lypinator 0:bb348c97df44 108 */
lypinator 0:bb348c97df44 109 #define LL_WWDG_WriteReg(__INSTANCE__, __REG__, __VALUE__) WRITE_REG(__INSTANCE__->__REG__, (__VALUE__))
lypinator 0:bb348c97df44 110
lypinator 0:bb348c97df44 111 /**
lypinator 0:bb348c97df44 112 * @brief Read a value in WWDG register
lypinator 0:bb348c97df44 113 * @param __INSTANCE__ WWDG Instance
lypinator 0:bb348c97df44 114 * @param __REG__ Register to be read
lypinator 0:bb348c97df44 115 * @retval Register value
lypinator 0:bb348c97df44 116 */
lypinator 0:bb348c97df44 117 #define LL_WWDG_ReadReg(__INSTANCE__, __REG__) READ_REG(__INSTANCE__->__REG__)
lypinator 0:bb348c97df44 118 /**
lypinator 0:bb348c97df44 119 * @}
lypinator 0:bb348c97df44 120 */
lypinator 0:bb348c97df44 121
lypinator 0:bb348c97df44 122
lypinator 0:bb348c97df44 123 /**
lypinator 0:bb348c97df44 124 * @}
lypinator 0:bb348c97df44 125 */
lypinator 0:bb348c97df44 126
lypinator 0:bb348c97df44 127 /* Exported functions --------------------------------------------------------*/
lypinator 0:bb348c97df44 128 /** @defgroup WWDG_LL_Exported_Functions WWDG Exported Functions
lypinator 0:bb348c97df44 129 * @{
lypinator 0:bb348c97df44 130 */
lypinator 0:bb348c97df44 131
lypinator 0:bb348c97df44 132 /** @defgroup WWDG_LL_EF_Configuration Configuration
lypinator 0:bb348c97df44 133 * @{
lypinator 0:bb348c97df44 134 */
lypinator 0:bb348c97df44 135 /**
lypinator 0:bb348c97df44 136 * @brief Enable Window Watchdog. The watchdog is always disabled after a reset.
lypinator 0:bb348c97df44 137 * @note It is enabled by setting the WDGA bit in the WWDG_CR register,
lypinator 0:bb348c97df44 138 * then it cannot be disabled again except by a reset.
lypinator 0:bb348c97df44 139 * This bit is set by software and only cleared by hardware after a reset.
lypinator 0:bb348c97df44 140 * When WDGA = 1, the watchdog can generate a reset.
lypinator 0:bb348c97df44 141 * @rmtoll CR WDGA LL_WWDG_Enable
lypinator 0:bb348c97df44 142 * @param WWDGx WWDG Instance
lypinator 0:bb348c97df44 143 * @retval None
lypinator 0:bb348c97df44 144 */
lypinator 0:bb348c97df44 145 __STATIC_INLINE void LL_WWDG_Enable(WWDG_TypeDef *WWDGx)
lypinator 0:bb348c97df44 146 {
lypinator 0:bb348c97df44 147 SET_BIT(WWDGx->CR, WWDG_CR_WDGA);
lypinator 0:bb348c97df44 148 }
lypinator 0:bb348c97df44 149
lypinator 0:bb348c97df44 150 /**
lypinator 0:bb348c97df44 151 * @brief Checks if Window Watchdog is enabled
lypinator 0:bb348c97df44 152 * @rmtoll CR WDGA LL_WWDG_IsEnabled
lypinator 0:bb348c97df44 153 * @param WWDGx WWDG Instance
lypinator 0:bb348c97df44 154 * @retval State of bit (1 or 0).
lypinator 0:bb348c97df44 155 */
lypinator 0:bb348c97df44 156 __STATIC_INLINE uint32_t LL_WWDG_IsEnabled(WWDG_TypeDef *WWDGx)
lypinator 0:bb348c97df44 157 {
lypinator 0:bb348c97df44 158 return (READ_BIT(WWDGx->CR, WWDG_CR_WDGA) == (WWDG_CR_WDGA));
lypinator 0:bb348c97df44 159 }
lypinator 0:bb348c97df44 160
lypinator 0:bb348c97df44 161 /**
lypinator 0:bb348c97df44 162 * @brief Set the Watchdog counter value to provided value (7-bits T[6:0])
lypinator 0:bb348c97df44 163 * @note When writing to the WWDG_CR register, always write 1 in the MSB b6 to avoid generating an immediate reset
lypinator 0:bb348c97df44 164 * This counter is decremented every (4096 x 2expWDGTB) PCLK cycles
lypinator 0:bb348c97df44 165 * A reset is produced when it rolls over from 0x40 to 0x3F (bit T6 becomes cleared)
lypinator 0:bb348c97df44 166 * Setting the counter lower then 0x40 causes an immediate reset (if WWDG enabled)
lypinator 0:bb348c97df44 167 * @rmtoll CR T LL_WWDG_SetCounter
lypinator 0:bb348c97df44 168 * @param WWDGx WWDG Instance
lypinator 0:bb348c97df44 169 * @param Counter 0..0x7F (7 bit counter value)
lypinator 0:bb348c97df44 170 * @retval None
lypinator 0:bb348c97df44 171 */
lypinator 0:bb348c97df44 172 __STATIC_INLINE void LL_WWDG_SetCounter(WWDG_TypeDef *WWDGx, uint32_t Counter)
lypinator 0:bb348c97df44 173 {
lypinator 0:bb348c97df44 174 MODIFY_REG(WWDGx->CR, WWDG_CR_T, Counter);
lypinator 0:bb348c97df44 175 }
lypinator 0:bb348c97df44 176
lypinator 0:bb348c97df44 177 /**
lypinator 0:bb348c97df44 178 * @brief Return current Watchdog Counter Value (7 bits counter value)
lypinator 0:bb348c97df44 179 * @rmtoll CR T LL_WWDG_GetCounter
lypinator 0:bb348c97df44 180 * @param WWDGx WWDG Instance
lypinator 0:bb348c97df44 181 * @retval 7 bit Watchdog Counter value
lypinator 0:bb348c97df44 182 */
lypinator 0:bb348c97df44 183 __STATIC_INLINE uint32_t LL_WWDG_GetCounter(WWDG_TypeDef *WWDGx)
lypinator 0:bb348c97df44 184 {
lypinator 0:bb348c97df44 185 return (uint32_t)(READ_BIT(WWDGx->CR, WWDG_CR_T));
lypinator 0:bb348c97df44 186 }
lypinator 0:bb348c97df44 187
lypinator 0:bb348c97df44 188 /**
lypinator 0:bb348c97df44 189 * @brief Set the time base of the prescaler (WDGTB).
lypinator 0:bb348c97df44 190 * @note Prescaler is used to apply ratio on PCLK clock, so that Watchdog counter
lypinator 0:bb348c97df44 191 * is decremented every (4096 x 2expWDGTB) PCLK cycles
lypinator 0:bb348c97df44 192 * @rmtoll CFR WDGTB LL_WWDG_SetPrescaler
lypinator 0:bb348c97df44 193 * @param WWDGx WWDG Instance
lypinator 0:bb348c97df44 194 * @param Prescaler This parameter can be one of the following values:
lypinator 0:bb348c97df44 195 * @arg @ref LL_WWDG_PRESCALER_1
lypinator 0:bb348c97df44 196 * @arg @ref LL_WWDG_PRESCALER_2
lypinator 0:bb348c97df44 197 * @arg @ref LL_WWDG_PRESCALER_4
lypinator 0:bb348c97df44 198 * @arg @ref LL_WWDG_PRESCALER_8
lypinator 0:bb348c97df44 199 * @retval None
lypinator 0:bb348c97df44 200 */
lypinator 0:bb348c97df44 201 __STATIC_INLINE void LL_WWDG_SetPrescaler(WWDG_TypeDef *WWDGx, uint32_t Prescaler)
lypinator 0:bb348c97df44 202 {
lypinator 0:bb348c97df44 203 MODIFY_REG(WWDGx->CFR, WWDG_CFR_WDGTB, Prescaler);
lypinator 0:bb348c97df44 204 }
lypinator 0:bb348c97df44 205
lypinator 0:bb348c97df44 206 /**
lypinator 0:bb348c97df44 207 * @brief Return current Watchdog Prescaler Value
lypinator 0:bb348c97df44 208 * @rmtoll CFR WDGTB LL_WWDG_GetPrescaler
lypinator 0:bb348c97df44 209 * @param WWDGx WWDG Instance
lypinator 0:bb348c97df44 210 * @retval Returned value can be one of the following values:
lypinator 0:bb348c97df44 211 * @arg @ref LL_WWDG_PRESCALER_1
lypinator 0:bb348c97df44 212 * @arg @ref LL_WWDG_PRESCALER_2
lypinator 0:bb348c97df44 213 * @arg @ref LL_WWDG_PRESCALER_4
lypinator 0:bb348c97df44 214 * @arg @ref LL_WWDG_PRESCALER_8
lypinator 0:bb348c97df44 215 */
lypinator 0:bb348c97df44 216 __STATIC_INLINE uint32_t LL_WWDG_GetPrescaler(WWDG_TypeDef *WWDGx)
lypinator 0:bb348c97df44 217 {
lypinator 0:bb348c97df44 218 return (uint32_t)(READ_BIT(WWDGx->CFR, WWDG_CFR_WDGTB));
lypinator 0:bb348c97df44 219 }
lypinator 0:bb348c97df44 220
lypinator 0:bb348c97df44 221 /**
lypinator 0:bb348c97df44 222 * @brief Set the Watchdog Window value to be compared to the downcounter (7-bits W[6:0]).
lypinator 0:bb348c97df44 223 * @note This window value defines when write in the WWDG_CR register
lypinator 0:bb348c97df44 224 * to program Watchdog counter is allowed.
lypinator 0:bb348c97df44 225 * Watchdog counter value update must occur only when the counter value
lypinator 0:bb348c97df44 226 * is lower than the Watchdog window register value.
lypinator 0:bb348c97df44 227 * Otherwise, a MCU reset is generated if the 7-bit Watchdog counter value
lypinator 0:bb348c97df44 228 * (in the control register) is refreshed before the downcounter has reached
lypinator 0:bb348c97df44 229 * the watchdog window register value.
lypinator 0:bb348c97df44 230 * Physically is possible to set the Window lower then 0x40 but it is not recommended.
lypinator 0:bb348c97df44 231 * To generate an immediate reset, it is possible to set the Counter lower than 0x40.
lypinator 0:bb348c97df44 232 * @rmtoll CFR W LL_WWDG_SetWindow
lypinator 0:bb348c97df44 233 * @param WWDGx WWDG Instance
lypinator 0:bb348c97df44 234 * @param Window 0x00..0x7F (7 bit Window value)
lypinator 0:bb348c97df44 235 * @retval None
lypinator 0:bb348c97df44 236 */
lypinator 0:bb348c97df44 237 __STATIC_INLINE void LL_WWDG_SetWindow(WWDG_TypeDef *WWDGx, uint32_t Window)
lypinator 0:bb348c97df44 238 {
lypinator 0:bb348c97df44 239 MODIFY_REG(WWDGx->CFR, WWDG_CFR_W, Window);
lypinator 0:bb348c97df44 240 }
lypinator 0:bb348c97df44 241
lypinator 0:bb348c97df44 242 /**
lypinator 0:bb348c97df44 243 * @brief Return current Watchdog Window Value (7 bits value)
lypinator 0:bb348c97df44 244 * @rmtoll CFR W LL_WWDG_GetWindow
lypinator 0:bb348c97df44 245 * @param WWDGx WWDG Instance
lypinator 0:bb348c97df44 246 * @retval 7 bit Watchdog Window value
lypinator 0:bb348c97df44 247 */
lypinator 0:bb348c97df44 248 __STATIC_INLINE uint32_t LL_WWDG_GetWindow(WWDG_TypeDef *WWDGx)
lypinator 0:bb348c97df44 249 {
lypinator 0:bb348c97df44 250 return (uint32_t)(READ_BIT(WWDGx->CFR, WWDG_CFR_W));
lypinator 0:bb348c97df44 251 }
lypinator 0:bb348c97df44 252
lypinator 0:bb348c97df44 253 /**
lypinator 0:bb348c97df44 254 * @}
lypinator 0:bb348c97df44 255 */
lypinator 0:bb348c97df44 256
lypinator 0:bb348c97df44 257 /** @defgroup WWDG_LL_EF_FLAG_Management FLAG_Management
lypinator 0:bb348c97df44 258 * @{
lypinator 0:bb348c97df44 259 */
lypinator 0:bb348c97df44 260 /**
lypinator 0:bb348c97df44 261 * @brief Indicates if the WWDG Early Wakeup Interrupt Flag is set or not.
lypinator 0:bb348c97df44 262 * @note This bit is set by hardware when the counter has reached the value 0x40.
lypinator 0:bb348c97df44 263 * It must be cleared by software by writing 0.
lypinator 0:bb348c97df44 264 * A write of 1 has no effect. This bit is also set if the interrupt is not enabled.
lypinator 0:bb348c97df44 265 * @rmtoll SR EWIF LL_WWDG_IsActiveFlag_EWKUP
lypinator 0:bb348c97df44 266 * @param WWDGx WWDG Instance
lypinator 0:bb348c97df44 267 * @retval State of bit (1 or 0).
lypinator 0:bb348c97df44 268 */
lypinator 0:bb348c97df44 269 __STATIC_INLINE uint32_t LL_WWDG_IsActiveFlag_EWKUP(WWDG_TypeDef *WWDGx)
lypinator 0:bb348c97df44 270 {
lypinator 0:bb348c97df44 271 return (READ_BIT(WWDGx->SR, WWDG_SR_EWIF) == (WWDG_SR_EWIF));
lypinator 0:bb348c97df44 272 }
lypinator 0:bb348c97df44 273
lypinator 0:bb348c97df44 274 /**
lypinator 0:bb348c97df44 275 * @brief Clear WWDG Early Wakeup Interrupt Flag (EWIF)
lypinator 0:bb348c97df44 276 * @rmtoll SR EWIF LL_WWDG_ClearFlag_EWKUP
lypinator 0:bb348c97df44 277 * @param WWDGx WWDG Instance
lypinator 0:bb348c97df44 278 * @retval None
lypinator 0:bb348c97df44 279 */
lypinator 0:bb348c97df44 280 __STATIC_INLINE void LL_WWDG_ClearFlag_EWKUP(WWDG_TypeDef *WWDGx)
lypinator 0:bb348c97df44 281 {
lypinator 0:bb348c97df44 282 WRITE_REG(WWDGx->SR, ~WWDG_SR_EWIF);
lypinator 0:bb348c97df44 283 }
lypinator 0:bb348c97df44 284
lypinator 0:bb348c97df44 285 /**
lypinator 0:bb348c97df44 286 * @}
lypinator 0:bb348c97df44 287 */
lypinator 0:bb348c97df44 288
lypinator 0:bb348c97df44 289 /** @defgroup WWDG_LL_EF_IT_Management IT_Management
lypinator 0:bb348c97df44 290 * @{
lypinator 0:bb348c97df44 291 */
lypinator 0:bb348c97df44 292 /**
lypinator 0:bb348c97df44 293 * @brief Enable the Early Wakeup Interrupt.
lypinator 0:bb348c97df44 294 * @note When set, an interrupt occurs whenever the counter reaches value 0x40.
lypinator 0:bb348c97df44 295 * This interrupt is only cleared by hardware after a reset
lypinator 0:bb348c97df44 296 * @rmtoll CFR EWI LL_WWDG_EnableIT_EWKUP
lypinator 0:bb348c97df44 297 * @param WWDGx WWDG Instance
lypinator 0:bb348c97df44 298 * @retval None
lypinator 0:bb348c97df44 299 */
lypinator 0:bb348c97df44 300 __STATIC_INLINE void LL_WWDG_EnableIT_EWKUP(WWDG_TypeDef *WWDGx)
lypinator 0:bb348c97df44 301 {
lypinator 0:bb348c97df44 302 SET_BIT(WWDGx->CFR, WWDG_CFR_EWI);
lypinator 0:bb348c97df44 303 }
lypinator 0:bb348c97df44 304
lypinator 0:bb348c97df44 305 /**
lypinator 0:bb348c97df44 306 * @brief Check if Early Wakeup Interrupt is enabled
lypinator 0:bb348c97df44 307 * @rmtoll CFR EWI LL_WWDG_IsEnabledIT_EWKUP
lypinator 0:bb348c97df44 308 * @param WWDGx WWDG Instance
lypinator 0:bb348c97df44 309 * @retval State of bit (1 or 0).
lypinator 0:bb348c97df44 310 */
lypinator 0:bb348c97df44 311 __STATIC_INLINE uint32_t LL_WWDG_IsEnabledIT_EWKUP(WWDG_TypeDef *WWDGx)
lypinator 0:bb348c97df44 312 {
lypinator 0:bb348c97df44 313 return (READ_BIT(WWDGx->CFR, WWDG_CFR_EWI) == (WWDG_CFR_EWI));
lypinator 0:bb348c97df44 314 }
lypinator 0:bb348c97df44 315
lypinator 0:bb348c97df44 316 /**
lypinator 0:bb348c97df44 317 * @}
lypinator 0:bb348c97df44 318 */
lypinator 0:bb348c97df44 319
lypinator 0:bb348c97df44 320 /**
lypinator 0:bb348c97df44 321 * @}
lypinator 0:bb348c97df44 322 */
lypinator 0:bb348c97df44 323
lypinator 0:bb348c97df44 324 /**
lypinator 0:bb348c97df44 325 * @}
lypinator 0:bb348c97df44 326 */
lypinator 0:bb348c97df44 327
lypinator 0:bb348c97df44 328 #endif /* WWDG */
lypinator 0:bb348c97df44 329
lypinator 0:bb348c97df44 330 /**
lypinator 0:bb348c97df44 331 * @}
lypinator 0:bb348c97df44 332 */
lypinator 0:bb348c97df44 333
lypinator 0:bb348c97df44 334 #ifdef __cplusplus
lypinator 0:bb348c97df44 335 }
lypinator 0:bb348c97df44 336 #endif
lypinator 0:bb348c97df44 337
lypinator 0:bb348c97df44 338 #endif /* __STM32F4xx_LL_WWDG_H */
lypinator 0:bb348c97df44 339
lypinator 0:bb348c97df44 340 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/