annotate Common/Drivers/STM32F4xx_HAL_DRIVER_v120/Inc/stm32f4xx_hal_wwdg.h @ 96:6eec2db15cf8 kittz

Sorry. Now.
author Dmitry Romanov <kitt@bk.ru>
date Mon, 26 Nov 2018 13:45:14 +0300
parents 5f11787b4f42
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
2 ******************************************************************************
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
3 * @file stm32f4xx_hal_wwdg.h
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
4 * @author MCD Application Team
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
5 * @version V1.2.0
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
6 * @date 26-December-2014
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
7 * @brief Header file of WWDG HAL module.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
8 ******************************************************************************
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
9 * @attention
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
10 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
11 * <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
12 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
13 * Redistribution and use in source and binary forms, with or without modification,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
14 * are permitted provided that the following conditions are met:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
15 * 1. Redistributions of source code must retain the above copyright notice,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
16 * this list of conditions and the following disclaimer.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
17 * 2. Redistributions in binary form must reproduce the above copyright notice,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
18 * this list of conditions and the following disclaimer in the documentation
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
19 * and/or other materials provided with the distribution.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
21 * may be used to endorse or promote products derived from this software
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
22 * without specific prior written permission.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
23 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
34 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
35 ******************************************************************************
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
36 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
37
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
38 /* Define to prevent recursive inclusion -------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
39 #ifndef __STM32F4xx_HAL_WWDG_H
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
40 #define __STM32F4xx_HAL_WWDG_H
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
41
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
42 #ifdef __cplusplus
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
43 extern "C" {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
44 #endif
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
45
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
46 /* Includes ------------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
47 #include "stm32f4xx_hal_def.h"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
48
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
49 /** @addtogroup STM32F4xx_HAL_Driver
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
50 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
51 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
52
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
53 /** @addtogroup WWDG
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
54 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
55 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
56
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
57 /* Exported types ------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
58 /** @defgroup WWDG_Exported_Types WWDG Exported Types
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
59 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
60 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
61
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
62 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
63 * @brief WWDG HAL State Structure definition
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
64 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
65 typedef enum
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
66 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
67 HAL_WWDG_STATE_RESET = 0x00, /*!< WWDG not yet initialized or disabled */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
68 HAL_WWDG_STATE_READY = 0x01, /*!< WWDG initialized and ready for use */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
69 HAL_WWDG_STATE_BUSY = 0x02, /*!< WWDG internal process is ongoing */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
70 HAL_WWDG_STATE_TIMEOUT = 0x03, /*!< WWDG timeout state */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
71 HAL_WWDG_STATE_ERROR = 0x04 /*!< WWDG error state */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
72 }HAL_WWDG_StateTypeDef;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
73
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
74 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
75 * @brief WWDG Init structure definition
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
76 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
77 typedef struct
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
78 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
79 uint32_t Prescaler; /*!< Specifies the prescaler value of the WWDG.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
80 This parameter can be a value of @ref WWDG_Prescaler */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
81
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
82 uint32_t Window; /*!< Specifies the WWDG window value to be compared to the downcounter.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
83 This parameter must be a number lower than Max_Data = 0x80 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
84
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
85 uint32_t Counter; /*!< Specifies the WWDG free-running downcounter value.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
86 This parameter must be a number between Min_Data = 0x40 and Max_Data = 0x7F */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
87
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
88 }WWDG_InitTypeDef;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
89
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
90 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
91 * @brief WWDG handle Structure definition
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
92 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
93 typedef struct
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
94 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
95 WWDG_TypeDef *Instance; /*!< Register base address */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
96
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
97 WWDG_InitTypeDef Init; /*!< WWDG required parameters */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
98
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
99 HAL_LockTypeDef Lock; /*!< WWDG locking object */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
100
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
101 __IO HAL_WWDG_StateTypeDef State; /*!< WWDG communication state */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
102
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
103 }WWDG_HandleTypeDef;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
104 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
105 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
106 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
107
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
108 /* Exported constants --------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
109 /** @defgroup WWDG_Exported_Constants WWDG Exported Constants
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
110 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
111 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
112
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
113 /** @defgroup WWDG_Interrupt_definition WWDG Interrupt definition
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
114 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
115 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
116 #define WWDG_IT_EWI WWDG_CFR_EWI /*!< Early wakeup interrupt */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
117 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
118 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
119 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
120
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
121 /** @defgroup WWDG_Flag_definition WWDG Flag definition
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
122 * @brief WWDG Flag definition
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
123 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
124 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
125 #define WWDG_FLAG_EWIF WWDG_SR_EWIF /*!< Early wakeup interrupt flag */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
126 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
127 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
128 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
129
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
130 /** @defgroup WWDG_Prescaler WWDG Prescaler
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
131 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
132 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
133 #define WWDG_PRESCALER_1 ((uint32_t)0x00000000) /*!< WWDG counter clock = (PCLK1/4096)/1 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
134 #define WWDG_PRESCALER_2 WWDG_CFR_WDGTB0 /*!< WWDG counter clock = (PCLK1/4096)/2 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
135 #define WWDG_PRESCALER_4 WWDG_CFR_WDGTB1 /*!< WWDG counter clock = (PCLK1/4096)/4 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
136 #define WWDG_PRESCALER_8 WWDG_CFR_WDGTB /*!< WWDG counter clock = (PCLK1/4096)/8 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
137 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
138 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
139 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
140
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
141 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
142 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
143 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
144
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
145 /* Exported macro ------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
146 /** @defgroup WWDG_Exported_Macros WWDG Exported Macros
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
147 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
148 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
149
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
150 /** @brief Reset WWDG handle state
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
151 * @param __HANDLE__: WWDG handle
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
152 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
153 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
154 #define __HAL_WWDG_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_WWDG_STATE_RESET)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
155
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
156 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
157 * @brief Enables the WWDG peripheral.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
158 * @param __HANDLE__: WWDG handle
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
159 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
160 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
161 #define __HAL_WWDG_ENABLE(__HANDLE__) SET_BIT((__HANDLE__)->Instance->CR, WWDG_CR_WDGA)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
162
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
163 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
164 * @brief Disables the WWDG peripheral.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
165 * @param __HANDLE__: WWDG handle
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
166 * @note WARNING: This is a dummy macro for HAL code alignment.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
167 * Once enable, WWDG Peripheral cannot be disabled except by a system reset.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
168 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
169 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
170 #define __HAL_WWDG_DISABLE(__HANDLE__) /* dummy macro */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
171
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
172 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
173 * @brief Gets the selected WWDG's it status.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
174 * @param __HANDLE__: WWDG handle
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
175 * @param __INTERRUPT__: specifies the it to check.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
176 * This parameter can be one of the following values:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
177 * @arg WWDG_FLAG_EWIF: Early wakeup interrupt IT
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
178 * @retval The new state of WWDG_FLAG (SET or RESET).
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
179 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
180 #define __HAL_WWDG_GET_IT(__HANDLE__, __INTERRUPT__) __HAL_WWDG_GET_FLAG((__HANDLE__),(__INTERRUPT__))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
181
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
182 /** @brief Clear the WWDG's interrupt pending bits
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
183 * bits to clear the selected interrupt pending bits.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
184 * @param __HANDLE__: WWDG handle
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
185 * @param __INTERRUPT__: specifies the interrupt pending bit to clear.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
186 * This parameter can be one of the following values:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
187 * @arg WWDG_FLAG_EWIF: Early wakeup interrupt flag
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
188 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
189 #define __HAL_WWDG_CLEAR_IT(__HANDLE__, __INTERRUPT__) __HAL_WWDG_CLEAR_FLAG((__HANDLE__), (__INTERRUPT__))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
190
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
191 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
192 * @brief Enables the WWDG early wakeup interrupt.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
193 * @param __HANDLE__: WWDG handle
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
194 * @param __INTERRUPT__: specifies the interrupt to enable.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
195 * This parameter can be one of the following values:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
196 * @arg WWDG_IT_EWI: Early wakeup interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
197 * @note Once enabled this interrupt cannot be disabled except by a system reset.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
198 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
199 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
200 #define __HAL_WWDG_ENABLE_IT(__HANDLE__, __INTERRUPT__) SET_BIT((__HANDLE__)->Instance->CFR, (__INTERRUPT__))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
201
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
202 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
203 * @brief Disables the WWDG early wakeup interrupt.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
204 * @param __HANDLE__: WWDG handle
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
205 * @param __INTERRUPT__: specifies the interrupt to disable.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
206 * This parameter can be one of the following values:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
207 * @arg WWDG_IT_EWI: Early wakeup interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
208 * @note WARNING: This is a dummy macro for HAL code alignment.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
209 * Once enabled this interrupt cannot be disabled except by a system reset.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
210 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
211 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
212 #define __HAL_WWDG_DISABLE_IT(__HANDLE__, __INTERRUPT__) /* dummy macro */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
213
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
214 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
215 * @brief Gets the selected WWDG's flag status.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
216 * @param __HANDLE__: WWDG handle
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
217 * @param __FLAG__: specifies the flag to check.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
218 * This parameter can be one of the following values:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
219 * @arg WWDG_FLAG_EWIF: Early wakeup interrupt flag
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
220 * @retval The new state of WWDG_FLAG (SET or RESET).
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
221 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
222 #define __HAL_WWDG_GET_FLAG(__HANDLE__, __FLAG__) (((__HANDLE__)->Instance->SR & (__FLAG__)) == (__FLAG__))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
223
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
224 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
225 * @brief Clears the WWDG's pending flags.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
226 * @param __HANDLE__: WWDG handle
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
227 * @param __FLAG__: specifies the flag to clear.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
228 * This parameter can be one of the following values:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
229 * @arg WWDG_FLAG_EWIF: Early wakeup interrupt flag
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
230 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
231 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
232 #define __HAL_WWDG_CLEAR_FLAG(__HANDLE__, __FLAG__) (((__HANDLE__)->Instance->SR) = ~(__FLAG__))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
233
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
234 /** @brief Checks if the specified WWDG interrupt source is enabled or disabled.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
235 * @param __HANDLE__: WWDG Handle.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
236 * @param __INTERRUPT__: specifies the WWDG interrupt source to check.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
237 * This parameter can be one of the following values:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
238 * @arg WWDG_IT_EWI: Early Wakeup Interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
239 * @retval state of __INTERRUPT__ (TRUE or FALSE).
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
240 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
241 #define __HAL_WWDG_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->Instance->CFR & (__INTERRUPT__)) == (__INTERRUPT__))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
242
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
243 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
244 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
245 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
246
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
247 /* Exported functions --------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
248 /** @addtogroup WWDG_Exported_Functions
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
249 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
250 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
251
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
252 /** @addtogroup WWDG_Exported_Functions_Group1
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
253 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
254 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
255 /* Initialization/de-initialization functions **********************************/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
256 HAL_StatusTypeDef HAL_WWDG_Init(WWDG_HandleTypeDef *hwwdg);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
257 HAL_StatusTypeDef HAL_WWDG_DeInit(WWDG_HandleTypeDef *hwwdg);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
258 void HAL_WWDG_MspInit(WWDG_HandleTypeDef *hwwdg);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
259 void HAL_WWDG_MspDeInit(WWDG_HandleTypeDef *hwwdg);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
260 void HAL_WWDG_WakeupCallback(WWDG_HandleTypeDef* hwwdg);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
261 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
262 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
263 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
264
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
265 /** @addtogroup WWDG_Exported_Functions_Group2
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
266 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
267 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
268 /* I/O operation functions ******************************************************/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
269 HAL_StatusTypeDef HAL_WWDG_Start(WWDG_HandleTypeDef *hwwdg);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
270 HAL_StatusTypeDef HAL_WWDG_Start_IT(WWDG_HandleTypeDef *hwwdg);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
271 HAL_StatusTypeDef HAL_WWDG_Refresh(WWDG_HandleTypeDef *hwwdg, uint32_t Counter);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
272 void HAL_WWDG_IRQHandler(WWDG_HandleTypeDef *hwwdg);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
273 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
274 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
275 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
276
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
277 /** @addtogroup WWDG_Exported_Functions_Group3
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
278 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
279 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
280 /* Peripheral State functions **************************************************/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
281 HAL_WWDG_StateTypeDef HAL_WWDG_GetState(WWDG_HandleTypeDef *hwwdg);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
282 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
283 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
284 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
285
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
286 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
287 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
288 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
289
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
290 /* Private types -------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
291 /* Private variables ---------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
292 /* Private constants ---------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
293 /** @defgroup WWDG_Private_Constants WWDG Private Constants
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
294 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
295 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
296 /** @defgroup WWDG_BitAddress_AliasRegion WWDG BitAddress
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
297 * @brief WWDG registers bit address in the alias region
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
298 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
299 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
300
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
301 /* --- CFR Register ---*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
302 /* Alias word address of EWI bit */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
303 #define WWDG_CFR_BASE (uint32_t)(WWDG_BASE + 0x04)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
304
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
305 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
306 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
307 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
308
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
309 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
310 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
311 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
312
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
313 /* Private macros ------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
314 /** @defgroup WWDG_Private_Macros WWDG Private Macros
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
315 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
316 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
317 #define IS_WWDG_PRESCALER(__PRESCALER__) (((__PRESCALER__) == WWDG_PRESCALER_1) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
318 ((__PRESCALER__) == WWDG_PRESCALER_2) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
319 ((__PRESCALER__) == WWDG_PRESCALER_4) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
320 ((__PRESCALER__) == WWDG_PRESCALER_8))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
321 #define IS_WWDG_WINDOW(__WINDOW__) ((__WINDOW__) <= 0x7F)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
322 #define IS_WWDG_COUNTER(__COUNTER__) (((__COUNTER__) >= 0x40) && ((__COUNTER__) <= 0x7F))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
323 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
324 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
325 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
326
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
327 /* Private functions ---------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
328 /** @defgroup WWDG_Private_Functions WWDG Private Functions
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
329 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
330 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
331
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
332 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
333 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
334 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
335
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
336 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
337 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
338 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
339
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
340 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
341 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
342 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
343 #ifdef __cplusplus
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
344 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
345 #endif
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
346
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
347 #endif /* __STM32F4xx_HAL_WWDG_H */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
348
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
349 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/