2 ******************************************************************************
\r
3 * @file stm32l1xx_wwdg.h
\r
4 * @author MCD Application Team
\r
6 * @date 05-March-2012
\r
7 * @brief This file contains all the functions prototypes for the WWDG
\r
9 ******************************************************************************
\r
12 * <h2><center>© COPYRIGHT 2012 STMicroelectronics</center></h2>
\r
14 * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
\r
15 * You may not use this file except in compliance with the License.
\r
16 * You may obtain a copy of the License at:
\r
18 * http://www.st.com/software_license_agreement_liberty_v2
\r
20 * Unless required by applicable law or agreed to in writing, software
\r
21 * distributed under the License is distributed on an "AS IS" BASIS,
\r
22 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
23 * See the License for the specific language governing permissions and
\r
24 * limitations under the License.
\r
26 ******************************************************************************
\r
29 /* Define to prevent recursive inclusion -------------------------------------*/
\r
30 #ifndef __STM32L1xx_WWDG_H
\r
31 #define __STM32L1xx_WWDG_H
\r
37 /* Includes ------------------------------------------------------------------*/
\r
38 #include "stm32l1xx.h"
\r
40 /** @addtogroup STM32L1xx_StdPeriph_Driver
\r
44 /** @addtogroup WWDG
\r
48 /* Exported types ------------------------------------------------------------*/
\r
49 /* Exported constants --------------------------------------------------------*/
\r
51 /** @defgroup WWDG_Exported_Constants
\r
55 /** @defgroup WWDG_Prescaler
\r
59 #define WWDG_Prescaler_1 ((uint32_t)0x00000000)
\r
60 #define WWDG_Prescaler_2 ((uint32_t)0x00000080)
\r
61 #define WWDG_Prescaler_4 ((uint32_t)0x00000100)
\r
62 #define WWDG_Prescaler_8 ((uint32_t)0x00000180)
\r
63 #define IS_WWDG_PRESCALER(PRESCALER) (((PRESCALER) == WWDG_Prescaler_1) || \
\r
64 ((PRESCALER) == WWDG_Prescaler_2) || \
\r
65 ((PRESCALER) == WWDG_Prescaler_4) || \
\r
66 ((PRESCALER) == WWDG_Prescaler_8))
\r
67 #define IS_WWDG_WINDOW_VALUE(VALUE) ((VALUE) <= 0x7F)
\r
68 #define IS_WWDG_COUNTER(COUNTER) (((COUNTER) >= 0x40) && ((COUNTER) <= 0x7F))
\r
78 /* Exported macro ------------------------------------------------------------*/
\r
79 /* Exported functions ------------------------------------------------------- */
\r
80 /* Function used to set the WWDG configuration to the default reset state ****/
\r
81 void WWDG_DeInit(void);
\r
83 /* Prescaler, Refresh window and Counter configuration functions **************/
\r
84 void WWDG_SetPrescaler(uint32_t WWDG_Prescaler);
\r
85 void WWDG_SetWindowValue(uint8_t WindowValue);
\r
86 void WWDG_EnableIT(void);
\r
87 void WWDG_SetCounter(uint8_t Counter);
\r
89 /* WWDG activation functions **************************************************/
\r
90 void WWDG_Enable(uint8_t Counter);
\r
92 /* Interrupts and flags management functions **********************************/
\r
93 FlagStatus WWDG_GetFlagStatus(void);
\r
94 void WWDG_ClearFlag(void);
\r
100 #endif /* __STM32L1xx_WWDG_H */
\r
110 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
\r