stm32f4xx_hal_iwdg.h
Go to the documentation of this file.
1 
20 /* Define to prevent recursive inclusion -------------------------------------*/
21 #ifndef STM32F4xx_HAL_IWDG_H
22 #define STM32F4xx_HAL_IWDG_H
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
28 /* Includes ------------------------------------------------------------------*/
29 #include "stm32f4xx_hal_def.h"
30 
39 /* Exported types ------------------------------------------------------------*/
47 typedef struct
48 {
49  uint32_t Prescaler;
52  uint32_t Reload;
56 
60 typedef struct
61 {
66 
67 
72 /* Exported constants --------------------------------------------------------*/
80 #define IWDG_PRESCALER_4 0x00000000u
81 #define IWDG_PRESCALER_8 IWDG_PR_PR_0
82 #define IWDG_PRESCALER_16 IWDG_PR_PR_1
83 #define IWDG_PRESCALER_32 (IWDG_PR_PR_1 | IWDG_PR_PR_0)
84 #define IWDG_PRESCALER_64 IWDG_PR_PR_2
85 #define IWDG_PRESCALER_128 (IWDG_PR_PR_2 | IWDG_PR_PR_0)
86 #define IWDG_PRESCALER_256 (IWDG_PR_PR_2 | IWDG_PR_PR_1)
98 /* Exported macros -----------------------------------------------------------*/
99 
108 #define __HAL_IWDG_START(__HANDLE__) WRITE_REG((__HANDLE__)->Instance->KR, IWDG_KEY_ENABLE)
109 
116 #define __HAL_IWDG_RELOAD_COUNTER(__HANDLE__) WRITE_REG((__HANDLE__)->Instance->KR, IWDG_KEY_RELOAD)
117 
122 /* Exported functions --------------------------------------------------------*/
130 /* Initialization/Start functions ********************************************/
139 /* I/O operation functions ****************************************************/
149 /* Private constants ---------------------------------------------------------*/
157 #define IWDG_KEY_RELOAD 0x0000AAAAu
158 #define IWDG_KEY_ENABLE 0x0000CCCCu
159 #define IWDG_KEY_WRITE_ACCESS_ENABLE 0x00005555u
160 #define IWDG_KEY_WRITE_ACCESS_DISABLE 0x00000000u
166 /* Private macros ------------------------------------------------------------*/
167 
176 #define IWDG_ENABLE_WRITE_ACCESS(__HANDLE__) WRITE_REG((__HANDLE__)->Instance->KR, IWDG_KEY_WRITE_ACCESS_ENABLE)
177 
183 #define IWDG_DISABLE_WRITE_ACCESS(__HANDLE__) WRITE_REG((__HANDLE__)->Instance->KR, IWDG_KEY_WRITE_ACCESS_DISABLE)
184 
190 #define IS_IWDG_PRESCALER(__PRESCALER__) (((__PRESCALER__) == IWDG_PRESCALER_4) || \
191  ((__PRESCALER__) == IWDG_PRESCALER_8) || \
192  ((__PRESCALER__) == IWDG_PRESCALER_16) || \
193  ((__PRESCALER__) == IWDG_PRESCALER_32) || \
194  ((__PRESCALER__) == IWDG_PRESCALER_64) || \
195  ((__PRESCALER__) == IWDG_PRESCALER_128)|| \
196  ((__PRESCALER__) == IWDG_PRESCALER_256))
197 
203 #define IS_IWDG_RELOAD(__RELOAD__) ((__RELOAD__) <= IWDG_RLR_RL)
204 
205 
206 
220 #ifdef __cplusplus
221 }
222 #endif
223 
224 #endif /* STM32F4xx_HAL_IWDG_H */
225 
226 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
IWDG_HandleTypeDef::Init
IWDG_InitTypeDef Init
Definition: stm32f4xx_hal_iwdg.h:64
IWDG_HandleTypeDef
IWDG Handle Structure definition.
Definition: stm32f4xx_hal_iwdg.h:60
HAL_StatusTypeDef
HAL_StatusTypeDef
HAL Status structures definition
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h:40
IWDG_InitTypeDef
IWDG Init structure definition.
Definition: stm32f4xx_hal_iwdg.h:47
stm32f4xx_hal_def.h
This file contains HAL common defines, enumeration, macros and structures definitions.
IWDG_InitTypeDef::Reload
uint32_t Reload
Definition: stm32f4xx_hal_iwdg.h:52
IWDG_InitTypeDef::Prescaler
uint32_t Prescaler
Definition: stm32f4xx_hal_iwdg.h:49
IWDG_TypeDef
Independent WATCHDOG.
Definition: stm32f407xx.h:574
HAL_IWDG_Init
HAL_StatusTypeDef HAL_IWDG_Init(IWDG_HandleTypeDef *hiwdg)
HAL_IWDG_Refresh
HAL_StatusTypeDef HAL_IWDG_Refresh(IWDG_HandleTypeDef *hiwdg)
IWDG_HandleTypeDef::Instance
IWDG_TypeDef * Instance
Definition: stm32f4xx_hal_iwdg.h:62


picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:14:52