apm32f10x_wwdt.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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.4
  7. *
  8. * @date 2022-12-01
  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. /* Define to prevent recursive inclusion */
  26. #ifndef __APM32F10X_WWDT_H
  27. #define __APM32F10X_WWDT_H
  28. /* Includes */
  29. #include "apm32f10x.h"
  30. #ifdef __cplusplus
  31. extern "C" {
  32. #endif
  33. /** @addtogroup APM32F10x_StdPeriphDriver
  34. @{
  35. */
  36. /** @addtogroup WWDT_Driver WWDT Driver
  37. @{
  38. */
  39. /** @defgroup WWDT_Enumerations Enumerations
  40. @{
  41. */
  42. /**
  43. * @brief WWDT Timebase(Prescaler) definition
  44. */
  45. typedef enum
  46. {
  47. WWDT_TIME_BASE_1 = 0x00000000,
  48. WWDT_TIME_BASE_2 = 0x00000080,
  49. WWDT_TIME_BASE_4 = 0x00000100,
  50. WWDT_TIME_BASE_8 = 0x00000180
  51. } WWDT_TIME_BASE_T;
  52. /**@} end of group WWDT_Enumerations */
  53. /** @defgroup WWDT_Functions Functions
  54. @{
  55. */
  56. /* WWDT reset */
  57. void WWDT_Reset(void);
  58. /* Configure WWDT Timebase */
  59. void WWDT_ConfigTimebase(WWDT_TIME_BASE_T timeBase);
  60. /* Configure Window Data */
  61. void WWDT_ConfigWindowData(uint8_t windowData);
  62. /* Configure Couter */
  63. void WWDT_ConfigCounter(uint8_t counter);
  64. /* Enable WWDT and Early Wakeup interrupt */
  65. void WWDT_EnableEWI(void);
  66. void WWDT_Enable(uint8_t count);
  67. /* Read Flag and Clear Flag */
  68. uint8_t WWDT_ReadFlag(void);
  69. void WWDT_ClearFlag(void);
  70. /**@} end of group WWDT_Functions */
  71. /**@} end of group WWDT_Driver */
  72. /**@} end of group APM32F10x_StdPeriphDriver */
  73. #ifdef __cplusplus
  74. }
  75. #endif
  76. #endif /* __APM32F10X_WWDT_H */