Move telemetry displayport init and cms device registering
[betaflight.git] / lib / main / STM32F3 / Drivers / STM32F30x_StdPeriph_Driver / inc / stm32f30x_iwdg.h
blob6469db4752310ae131f97c6725cb414a65b02d56
1 /**
2 ******************************************************************************
3 * @file stm32f30x_iwdg.h
4 * @author MCD Application Team
5 * @version V1.1.1
6 * @date 04-April-2014
7 * @brief This file contains all the functions prototypes for the IWDG
8 * firmware library.
9 ******************************************************************************
10 * @attention
12 * <h2><center>&copy; COPYRIGHT 2014 STMicroelectronics</center></h2>
14 * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
15 * You may not use this file except in compliance with the License.
16 * You may obtain a copy of the License at:
18 * http://www.st.com/software_license_agreement_liberty_v2
20 * Unless required by applicable law or agreed to in writing, software
21 * distributed under the License is distributed on an "AS IS" BASIS,
22 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23 * See the License for the specific language governing permissions and
24 * limitations under the License.
26 ******************************************************************************
29 /* Define to prevent recursive inclusion -------------------------------------*/
30 #ifndef __STM32F30x_IWDG_H
31 #define __STM32F30x_IWDG_H
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
37 /* Includes ------------------------------------------------------------------*/
38 #include "stm32f30x.h"
40 /** @addtogroup STM32F30x_StdPeriph_Driver
41 * @{
44 /** @addtogroup IWDG
45 * @{
48 /* Exported types ------------------------------------------------------------*/
49 /* Exported constants --------------------------------------------------------*/
51 /** @defgroup IWDG_Exported_Constants
52 * @{
55 /** @defgroup IWDG_WriteAccess
56 * @{
59 #define IWDG_WriteAccess_Enable ((uint16_t)0x5555)
60 #define IWDG_WriteAccess_Disable ((uint16_t)0x0000)
61 #define IS_IWDG_WRITE_ACCESS(ACCESS) (((ACCESS) == IWDG_WriteAccess_Enable) || \
62 ((ACCESS) == IWDG_WriteAccess_Disable))
63 /**
64 * @}
67 /** @defgroup IWDG_prescaler
68 * @{
71 #define IWDG_Prescaler_4 ((uint8_t)0x00)
72 #define IWDG_Prescaler_8 ((uint8_t)0x01)
73 #define IWDG_Prescaler_16 ((uint8_t)0x02)
74 #define IWDG_Prescaler_32 ((uint8_t)0x03)
75 #define IWDG_Prescaler_64 ((uint8_t)0x04)
76 #define IWDG_Prescaler_128 ((uint8_t)0x05)
77 #define IWDG_Prescaler_256 ((uint8_t)0x06)
78 #define IS_IWDG_PRESCALER(PRESCALER) (((PRESCALER) == IWDG_Prescaler_4) || \
79 ((PRESCALER) == IWDG_Prescaler_8) || \
80 ((PRESCALER) == IWDG_Prescaler_16) || \
81 ((PRESCALER) == IWDG_Prescaler_32) || \
82 ((PRESCALER) == IWDG_Prescaler_64) || \
83 ((PRESCALER) == IWDG_Prescaler_128)|| \
84 ((PRESCALER) == IWDG_Prescaler_256))
85 /**
86 * @}
89 /** @defgroup IWDG_Flag
90 * @{
93 #define IWDG_FLAG_PVU ((uint16_t)0x0001)
94 #define IWDG_FLAG_RVU ((uint16_t)0x0002)
95 #define IWDG_FLAG_WVU ((uint16_t)0x0002)
96 #define IS_IWDG_FLAG(FLAG) (((FLAG) == IWDG_FLAG_PVU) || ((FLAG) == IWDG_FLAG_RVU) || \
97 ((FLAG) == IWDG_FLAG_WVU))
98 /**
99 * @}
102 /** @defgroup IWDG_Reload_Value
103 * @{
105 #define IS_IWDG_RELOAD(RELOAD) ((RELOAD) <= 0xFFF)
108 * @}
111 /** @defgroup IWDG_CounterWindow_Value
112 * @{
114 #define IS_IWDG_WINDOW_VALUE(VALUE) ((VALUE) <= 0xFFF)
116 * @}
120 * @}
123 /* Exported macro ------------------------------------------------------------*/
124 /* Exported functions --------------------------------------------------------*/
126 /* Prescaler and Counter configuration functions ******************************/
127 void IWDG_WriteAccessCmd(uint16_t IWDG_WriteAccess);
128 void IWDG_SetPrescaler(uint8_t IWDG_Prescaler);
129 void IWDG_SetReload(uint16_t Reload);
130 void IWDG_ReloadCounter(void);
131 void IWDG_SetWindowValue(uint16_t WindowValue);
133 /* IWDG activation function ***************************************************/
134 void IWDG_Enable(void);
136 /* Flag management function ***************************************************/
137 FlagStatus IWDG_GetFlagStatus(uint16_t IWDG_FLAG);
139 #ifdef __cplusplus
141 #endif
143 #endif /* __STM32F30x_IWDG_H */
146 * @}
150 * @}
153 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/