stm32f10x_iwdg.h
Go to the documentation of this file.
1 
23 /* Define to prevent recursive inclusion -------------------------------------*/
24 #ifndef __STM32F10x_IWDG_H
25 #define __STM32F10x_IWDG_H
26 
27 #ifdef __cplusplus
28  extern "C" {
29 #endif
30 
31 /* Includes ------------------------------------------------------------------*/
32 #include "stm32f10x.h"
33 
58 #define IWDG_WriteAccess_Enable ((uint16_t)0x5555)
59 #define IWDG_WriteAccess_Disable ((uint16_t)0x0000)
60 #define IS_IWDG_WRITE_ACCESS(ACCESS) (((ACCESS) == IWDG_WriteAccess_Enable) || \
61  ((ACCESS) == IWDG_WriteAccess_Disable))
62 
70 #define IWDG_Prescaler_4 ((uint8_t)0x00)
71 #define IWDG_Prescaler_8 ((uint8_t)0x01)
72 #define IWDG_Prescaler_16 ((uint8_t)0x02)
73 #define IWDG_Prescaler_32 ((uint8_t)0x03)
74 #define IWDG_Prescaler_64 ((uint8_t)0x04)
75 #define IWDG_Prescaler_128 ((uint8_t)0x05)
76 #define IWDG_Prescaler_256 ((uint8_t)0x06)
77 #define IS_IWDG_PRESCALER(PRESCALER) (((PRESCALER) == IWDG_Prescaler_4) || \
78  ((PRESCALER) == IWDG_Prescaler_8) || \
79  ((PRESCALER) == IWDG_Prescaler_16) || \
80  ((PRESCALER) == IWDG_Prescaler_32) || \
81  ((PRESCALER) == IWDG_Prescaler_64) || \
82  ((PRESCALER) == IWDG_Prescaler_128)|| \
83  ((PRESCALER) == IWDG_Prescaler_256))
84 
92 #define IWDG_FLAG_PVU ((uint16_t)0x0001)
93 #define IWDG_FLAG_RVU ((uint16_t)0x0002)
94 #define IS_IWDG_FLAG(FLAG) (((FLAG) == IWDG_FLAG_PVU) || ((FLAG) == IWDG_FLAG_RVU))
95 #define IS_IWDG_RELOAD(RELOAD) ((RELOAD) <= 0xFFF)
96 
116 void IWDG_WriteAccessCmd(uint16_t IWDG_WriteAccess);
117 void IWDG_SetPrescaler(uint8_t IWDG_Prescaler);
118 void IWDG_SetReload(uint16_t Reload);
119 void IWDG_ReloadCounter(void);
120 void IWDG_Enable(void);
121 FlagStatus IWDG_GetFlagStatus(uint16_t IWDG_FLAG);
122 
123 #ifdef __cplusplus
124 }
125 #endif
126 
127 #endif /* __STM32F10x_IWDG_H */
128 
140 /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
FlagStatus
Definition: stm32f4xx.h:706
void IWDG_SetPrescaler(uint8_t IWDG_Prescaler)
Sets IWDG Prescaler value.
void IWDG_SetReload(uint16_t Reload)
Sets IWDG Reload value.
FlagStatus IWDG_GetFlagStatus(uint16_t IWDG_FLAG)
Checks whether the specified IWDG flag is set or not.
void IWDG_Enable(void)
Enables IWDG (write access to IWDG_PR and IWDG_RLR registers disabled).
void IWDG_WriteAccessCmd(uint16_t IWDG_WriteAccess)
Enables or disables write access to IWDG_PR and IWDG_RLR registers.
void IWDG_ReloadCounter(void)
Reloads IWDG counter with value defined in the reload register (write access to IWDG_PR and IWDG_RLR ...
CMSIS Cortex-M3 Device Peripheral Access Layer Header File. This file contains all the peripheral reg...


rosflight_firmware
Author(s): Daniel Koch , James Jackson
autogenerated on Thu Oct 24 2019 03:17:19