1 /** 2 ****************************************************************************** 3 * @file stm32f0xx_wwdg.h 4 * @author MCD Application Team 5 * @version V1.5.0 6 * @date 05-December-2014 7 * @brief This file contains all the functions prototypes for the WWDG 8 * firmware library. 9 ****************************************************************************** 10 * @attention 11 * 12 * <h2><center>© COPYRIGHT 2014 STMicroelectronics</center></h2> 13 * 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: 17 * 18 * http://www.st.com/software_license_agreement_liberty_v2 19 * 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. 25 * 26 ****************************************************************************** 27 */ 28 29 /* Define to prevent recursive inclusion -------------------------------------*/ 30 #ifndef __STM32F0XX_WWDG_H 31 #define __STM32F0XX_WWDG_H 32 33 #ifdef __cplusplus 34 extern "C" { 35 #endif 36 37 /* Includes ------------------------------------------------------------------*/ 38 #include "stm32f0xx.h" 39 40 /** @addtogroup STM32F0xx_StdPeriph_Driver 41 * @{ 42 */ 43 44 /** @addtogroup WWDG 45 * @{ 46 */ 47 /* Exported types ------------------------------------------------------------*/ 48 /* Exported constants --------------------------------------------------------*/ 49 50 /** @defgroup WWDG_Exported_Constants 51 * @{ 52 */ 53 54 /** @defgroup WWDG_Prescaler 55 * @{ 56 */ 57 58 #define WWDG_Prescaler_1 ((uint32_t)0x00000000) 59 #define WWDG_Prescaler_2 ((uint32_t)0x00000080) 60 #define WWDG_Prescaler_4 ((uint32_t)0x00000100) 61 #define WWDG_Prescaler_8 ((uint32_t)0x00000180) 62 #define IS_WWDG_PRESCALER(PRESCALER) (((PRESCALER) == WWDG_Prescaler_1) || \ 63 ((PRESCALER) == WWDG_Prescaler_2) || \ 64 ((PRESCALER) == WWDG_Prescaler_4) || \ 65 ((PRESCALER) == WWDG_Prescaler_8)) 66 #define IS_WWDG_WINDOW_VALUE(VALUE) ((VALUE) <= 0x7F) 67 #define IS_WWDG_COUNTER(COUNTER) (((COUNTER) >= 0x40) && ((COUNTER) <= 0x7F)) 68 69 /** 70 * @} 71 */ 72 73 /** 74 * @} 75 */ 76 77 /* Exported macro ------------------------------------------------------------*/ 78 /* Exported functions ------------------------------------------------------- */ 79 /* Function used to set the WWDG configuration to the default reset state ****/ 80 void WWDG_DeInit(void); 81 82 /* Prescaler, Refresh window and Counter configuration functions **************/ 83 void WWDG_SetPrescaler(uint32_t WWDG_Prescaler); 84 void WWDG_SetWindowValue(uint8_t WindowValue); 85 void WWDG_EnableIT(void); 86 void WWDG_SetCounter(uint8_t Counter); 87 88 /* WWDG activation functions **************************************************/ 89 void WWDG_Enable(uint8_t Counter); 90 91 /* Interrupts and flags management functions **********************************/ 92 FlagStatus WWDG_GetFlagStatus(void); 93 void WWDG_ClearFlag(void); 94 95 #ifdef __cplusplus 96 } 97 #endif 98 99 #endif /* __STM32F0XX_WWDG_H */ 100 101 /** 102 * @} 103 */ 104 105 /** 106 * @} 107 */ 108 109 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 110