stm32f0xx_wwdg.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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>&copy; 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. /* Define to prevent recursive inclusion -------------------------------------*/
  29. #ifndef __STM32F0XX_WWDG_H
  30. #define __STM32F0XX_WWDG_H
  31. #ifdef __cplusplus
  32. extern "C" {
  33. #endif
  34. /* Includes ------------------------------------------------------------------*/
  35. #include "stm32f0xx.h"
  36. /** @addtogroup STM32F0xx_StdPeriph_Driver
  37. * @{
  38. */
  39. /** @addtogroup WWDG
  40. * @{
  41. */
  42. /* Exported types ------------------------------------------------------------*/
  43. /* Exported constants --------------------------------------------------------*/
  44. /** @defgroup WWDG_Exported_Constants
  45. * @{
  46. */
  47. /** @defgroup WWDG_Prescaler
  48. * @{
  49. */
  50. #define WWDG_Prescaler_1 ((uint32_t)0x00000000)
  51. #define WWDG_Prescaler_2 ((uint32_t)0x00000080)
  52. #define WWDG_Prescaler_4 ((uint32_t)0x00000100)
  53. #define WWDG_Prescaler_8 ((uint32_t)0x00000180)
  54. #define IS_WWDG_PRESCALER(PRESCALER) (((PRESCALER) == WWDG_Prescaler_1) || \
  55. ((PRESCALER) == WWDG_Prescaler_2) || \
  56. ((PRESCALER) == WWDG_Prescaler_4) || \
  57. ((PRESCALER) == WWDG_Prescaler_8))
  58. #define IS_WWDG_WINDOW_VALUE(VALUE) ((VALUE) <= 0x7F)
  59. #define IS_WWDG_COUNTER(COUNTER) (((COUNTER) >= 0x40) && ((COUNTER) <= 0x7F))
  60. /**
  61. * @}
  62. */
  63. /**
  64. * @}
  65. */
  66. /* Exported macro ------------------------------------------------------------*/
  67. /* Exported functions ------------------------------------------------------- */
  68. /* Function used to set the WWDG configuration to the default reset state ****/
  69. void WWDG_DeInit(void);
  70. /* Prescaler, Refresh window and Counter configuration functions **************/
  71. void WWDG_SetPrescaler(uint32_t WWDG_Prescaler);
  72. void WWDG_SetWindowValue(uint8_t WindowValue);
  73. void WWDG_EnableIT(void);
  74. void WWDG_SetCounter(uint8_t Counter);
  75. /* WWDG activation functions **************************************************/
  76. void WWDG_Enable(uint8_t Counter);
  77. /* Interrupts and flags management functions **********************************/
  78. FlagStatus WWDG_GetFlagStatus(void);
  79. void WWDG_ClearFlag(void);
  80. #ifdef __cplusplus
  81. }
  82. #endif
  83. #endif /* __STM32F0XX_WWDG_H */
  84. /**
  85. * @}
  86. */
  87. /**
  88. * @}
  89. */
  90. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/