apm32f10x_wwdt.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /*!
  2. * @file apm32f10x_wwdt.h
  3. *
  4. * @brief This file contains all the functions prototypes for the WWDT firmware library
  5. *
  6. * @version V1.0.1
  7. *
  8. * @date 2021-03-23
  9. *
  10. */
  11. #ifndef __APM32F10X_WWDT_H
  12. #define __APM32F10X_WWDT_H
  13. #include "apm32f10x.h"
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. /** @addtogroup Peripherals_Library Standard Peripheral Library
  18. @{
  19. */
  20. /** @addtogroup WWDT_Driver WWDT Driver
  21. @{
  22. */
  23. /** @addtogroup WWDT_Enumerations Enumerations
  24. @{
  25. */
  26. /**
  27. * @brief WWDT Timebase(Prescaler) define
  28. */
  29. typedef enum
  30. {
  31. WWDT_TIME_BASE_1 = 0x00000000,
  32. WWDT_TIME_BASE_2 = 0x00000080,
  33. WWDT_TIME_BASE_4 = 0x00000100,
  34. WWDT_TIME_BASE_8 = 0x00000180
  35. }WWDT_TIME_BASE_T;
  36. /**@} end of group WWDT_Enumerations*/
  37. /** @addtogroup WWDT_Fuctions Fuctions
  38. @{
  39. */
  40. /** WWDT reset */
  41. void WWDT_Reset(void);
  42. /** Config WWDT Timebase */
  43. void WWDT_ConfigTimebase(WWDT_TIME_BASE_T timeBase);
  44. /** Config Window Data */
  45. void WWDT_ConfigWindowData(uint8_t windowData);
  46. /** Config Couter */
  47. void WWDT_ConfigCounter(uint8_t counter);
  48. /** Enable WWDT and Early Wakeup interrupt */
  49. void WWDT_EnableEWI(void);
  50. void WWDT_Enable(uint8_t count);
  51. /** Read Flag and Clear Flag */
  52. uint8_t WWDT_ReadFlag(void);
  53. void WWDT_ClearFlag(void);
  54. /**@} end of group WWDT_Fuctions*/
  55. /**@} end of group WWDT_Driver */
  56. /**@} end of group Peripherals_Library*/
  57. #ifdef __cplusplus
  58. }
  59. #endif
  60. #endif /* __APM32F10X_WWDT_H */