apm32f0xx_wwdt.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. /*!
  2. * @file apm32f0xx_wwdt.h
  3. *
  4. * @brief This file contains all the functions prototypes for the WWDG firmware library
  5. *
  6. * @version V1.0.2
  7. *
  8. * @date 2022-02-21
  9. *
  10. * @attention
  11. *
  12. * Copyright (C) 2020-2022 Geehy Semiconductor
  13. *
  14. * You may not use this file except in compliance with the
  15. * GEEHY COPYRIGHT NOTICE (GEEHY SOFTWARE PACKAGE LICENSE).
  16. *
  17. * The program is only for reference, which is distributed in the hope
  18. * that it will be useful and instructional for customers to develop
  19. * their software. Unless required by applicable law or agreed to in
  20. * writing, the program is distributed on an "AS IS" BASIS, WITHOUT
  21. * ANY WARRANTY OR CONDITIONS OF ANY KIND, either express or implied.
  22. * See the GEEHY SOFTWARE PACKAGE LICENSE for the governing permissions
  23. * and limitations under the License.
  24. */
  25. #ifndef __APM32F0XX_WWDT_H
  26. #define __APM32F0XX_WWDT_H
  27. #ifdef __cplusplus
  28. extern "C" {
  29. #endif
  30. #include "apm32f0xx.h"
  31. /** @addtogroup APM32F0xx_StdPeriphDriver
  32. @{
  33. */
  34. /** @addtogroup WWDT_Driver WWDT Driver
  35. @{
  36. */
  37. /** @defgroup WWDT_Macros Macros
  38. @{
  39. */
  40. /**@} end of group WWDT_Macros */
  41. /** @defgroup WWDT_Enumerations Enumerations
  42. @{
  43. */
  44. /**
  45. * @brief WWDT Timebase(Prescaler) define
  46. */
  47. typedef enum
  48. {
  49. WWDT_DIV_1 = ((uint8_t)0x00),
  50. WWDT_DIV_2 = ((uint8_t)0x01),
  51. WWDT_DIV_4 = ((uint8_t)0x02),
  52. WWDT_DIV_8 = ((uint8_t)0x03)
  53. } WWDT_DIV_T;
  54. /**@} end of group WWDT_Enumerations*/
  55. /** @defgroup WWDT_Structures Structures
  56. @{
  57. */
  58. /**@} end of group WWDT_Structures */
  59. /** @defgroup WWDT_Variables Variables
  60. @{
  61. */
  62. /**@} end of group WWDT_Variables */
  63. /** @defgroup WWDT_Functions Functions
  64. @{
  65. */
  66. /* WWDT reset */
  67. void WWDT_Reset(void);
  68. /* Set WWDT Timebase */
  69. void WWDT_SetTimebase(uint32_t div);
  70. /* Set Window Data */
  71. void WWDT_ConfigWindowValue(uint16_t windowValue);
  72. /* Set Couter */
  73. void WWDT_ConfigCounter(uint8_t couter);
  74. /* Enable WWDT and Early Wakeup interrupt */
  75. void WWDT_EnableEWI(void);
  76. void WWDT_Enable(uint8_t count);
  77. /* Read Flag and Clear Flag */
  78. uint8_t WWDT_ReadStatusFlag(void);
  79. void WWDT_ClearStatusFlag(void);
  80. #ifdef __cplusplus
  81. }
  82. #endif
  83. #endif /* __APM32F0XX_WWDT_H */
  84. /**@} end of group WWDT_Functions */
  85. /**@} end of group WWDT_Driver */
  86. /**@} end of group APM32F0xx_StdPeriphDriver */