stm32f10x_wwdg.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. /**
  2. ******************************************************************************
  3. * @file stm32f10x_wwdg.h
  4. * @author MCD Application Team
  5. * @version V3.3.0
  6. * @date 04/16/2010
  7. * @brief This file contains all the functions prototypes for the WWDG firmware
  8. * library.
  9. ******************************************************************************
  10. * @copy
  11. *
  12. * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
  13. * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
  14. * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
  15. * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
  16. * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
  17. * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
  18. *
  19. * <h2><center>&copy; COPYRIGHT 2010 STMicroelectronics</center></h2>
  20. */
  21. /* Define to prevent recursive inclusion -------------------------------------*/
  22. #ifndef __STM32F10x_WWDG_H
  23. #define __STM32F10x_WWDG_H
  24. #ifdef __cplusplus
  25. extern "C" {
  26. #endif
  27. /* Includes ------------------------------------------------------------------*/
  28. #include "stm32f10x.h"
  29. /** @addtogroup STM32F10x_StdPeriph_Driver
  30. * @{
  31. */
  32. /** @addtogroup WWDG
  33. * @{
  34. */
  35. /** @defgroup WWDG_Exported_Types
  36. * @{
  37. */
  38. /**
  39. * @}
  40. */
  41. /** @defgroup WWDG_Exported_Constants
  42. * @{
  43. */
  44. /** @defgroup WWDG_Prescaler
  45. * @{
  46. */
  47. #define WWDG_Prescaler_1 ((uint32_t)0x00000000)
  48. #define WWDG_Prescaler_2 ((uint32_t)0x00000080)
  49. #define WWDG_Prescaler_4 ((uint32_t)0x00000100)
  50. #define WWDG_Prescaler_8 ((uint32_t)0x00000180)
  51. #define IS_WWDG_PRESCALER(PRESCALER) (((PRESCALER) == WWDG_Prescaler_1) || \
  52. ((PRESCALER) == WWDG_Prescaler_2) || \
  53. ((PRESCALER) == WWDG_Prescaler_4) || \
  54. ((PRESCALER) == WWDG_Prescaler_8))
  55. #define IS_WWDG_WINDOW_VALUE(VALUE) ((VALUE) <= 0x7F)
  56. #define IS_WWDG_COUNTER(COUNTER) (((COUNTER) >= 0x40) && ((COUNTER) <= 0x7F))
  57. /**
  58. * @}
  59. */
  60. /**
  61. * @}
  62. */
  63. /** @defgroup WWDG_Exported_Macros
  64. * @{
  65. */
  66. /**
  67. * @}
  68. */
  69. /** @defgroup WWDG_Exported_Functions
  70. * @{
  71. */
  72. void WWDG_DeInit(void);
  73. void WWDG_SetPrescaler(uint32_t WWDG_Prescaler);
  74. void WWDG_SetWindowValue(uint8_t WindowValue);
  75. void WWDG_EnableIT(void);
  76. void WWDG_SetCounter(uint8_t Counter);
  77. void WWDG_Enable(uint8_t Counter);
  78. FlagStatus WWDG_GetFlagStatus(void);
  79. void WWDG_ClearFlag(void);
  80. #ifdef __cplusplus
  81. }
  82. #endif
  83. #endif /* __STM32F10x_WWDG_H */
  84. /**
  85. * @}
  86. */
  87. /**
  88. * @}
  89. */
  90. /**
  91. * @}
  92. */
  93. /******************* (C) COPYRIGHT 2010 STMicroelectronics *****END OF FILE****/