apm32f10x_wwdt.h 2.1 KB

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