stm32f10x_wwdg.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /******************** (C) COPYRIGHT 2008 STMicroelectronics ********************
  2. * File Name : stm32f10x_wwdg.h
  3. * Author : MCD Application Team
  4. * Version : V2.0.3
  5. * Date : 09/22/2008
  6. * Description : This file contains all the functions prototypes for the
  7. * WWDG firmware library.
  8. ********************************************************************************
  9. * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
  10. * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
  11. * AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
  12. * INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
  13. * CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
  14. * INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
  15. *******************************************************************************/
  16. /* Define to prevent recursive inclusion -------------------------------------*/
  17. #ifndef __STM32F10x_WWDG_H
  18. #define __STM32F10x_WWDG_H
  19. /* Includes ------------------------------------------------------------------*/
  20. #include "stm32f10x_map.h"
  21. /* Exported types ------------------------------------------------------------*/
  22. /* Exported constants --------------------------------------------------------*/
  23. /* WWDG Prescaler */
  24. #define WWDG_Prescaler_1 ((u32)0x00000000)
  25. #define WWDG_Prescaler_2 ((u32)0x00000080)
  26. #define WWDG_Prescaler_4 ((u32)0x00000100)
  27. #define WWDG_Prescaler_8 ((u32)0x00000180)
  28. #define IS_WWDG_PRESCALER(PRESCALER) (((PRESCALER) == WWDG_Prescaler_1) || \
  29. ((PRESCALER) == WWDG_Prescaler_2) || \
  30. ((PRESCALER) == WWDG_Prescaler_4) || \
  31. ((PRESCALER) == WWDG_Prescaler_8))
  32. #define IS_WWDG_WINDOW_VALUE(VALUE) ((VALUE) <= 0x7F)
  33. #define IS_WWDG_COUNTER(COUNTER) (((COUNTER) >= 0x40) && ((COUNTER) <= 0x7F))
  34. /* Exported macro ------------------------------------------------------------*/
  35. /* Exported functions ------------------------------------------------------- */
  36. void WWDG_DeInit(void);
  37. void WWDG_SetPrescaler(u32 WWDG_Prescaler);
  38. void WWDG_SetWindowValue(u8 WindowValue);
  39. void WWDG_EnableIT(void);
  40. void WWDG_SetCounter(u8 Counter);
  41. void WWDG_Enable(u8 Counter);
  42. FlagStatus WWDG_GetFlagStatus(void);
  43. void WWDG_ClearFlag(void);
  44. #endif /* __STM32F10x_WWDG_H */
  45. /******************* (C) COPYRIGHT 2008 STMicroelectronics *****END OF FILE****/