wm_watchdog.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. /**
  2. * @file wm_watchdog.h
  3. *
  4. * @brief watchdog Driver Module
  5. *
  6. * @author dave
  7. *
  8. * Copyright (c) 2014 Winner Microelectronics Co., Ltd.
  9. */
  10. #ifndef WM_WATCHDOG_H
  11. #define WM_WATCHDOG_H
  12. /**
  13. * @defgroup Driver_APIs Driver APIs
  14. * @brief Driver APIs
  15. */
  16. /**
  17. * @addtogroup Driver_APIs
  18. * @{
  19. */
  20. /**
  21. * @defgroup WDG_Driver_APIs WDG Driver APIs
  22. * @brief WDG driver APIs
  23. */
  24. /**
  25. * @addtogroup WDG_Driver_APIs
  26. * @{
  27. */
  28. /**
  29. * @brief This function is used to feed the dog.
  30. *
  31. * @param None
  32. *
  33. * @return None
  34. *
  35. * @note None
  36. */
  37. void tls_watchdog_clr(void);
  38. /**
  39. * @brief This function is used to init and start the watchdog.
  40. *
  41. * @param[in] usec microseconds
  42. *
  43. * @return None
  44. *
  45. * @note None
  46. */
  47. void tls_watchdog_init(u32 usec);
  48. /**
  49. * @brief This function is used to deinit watchdog
  50. *
  51. * @param[in] None
  52. *
  53. * @return None
  54. *
  55. * @note None
  56. */
  57. void tls_watchdog_deinit(void);
  58. /**
  59. * @brief This function is used to reset the system.
  60. *
  61. * @param None
  62. *
  63. * @return None
  64. *
  65. * @note None
  66. */
  67. void tls_sys_reset(void);
  68. /**
  69. * @brief This function is used to set reboot reason
  70. *
  71. * @param reason (enum SYS_REBOOT_REASON)
  72. *
  73. * @return None
  74. *
  75. * @note used with tls_sys_reset
  76. */
  77. void tls_sys_set_reboot_reason(u32 reason);
  78. /**
  79. * @brief This function is used to get reboot reason
  80. *
  81. * @param None
  82. *
  83. * @return reason (enum SYS_REBOOT_REASON)
  84. *
  85. * @note None
  86. */
  87. int tls_sys_get_reboot_reason(void);
  88. /**
  89. * @}
  90. */
  91. /**
  92. * @}
  93. */
  94. #endif /* WM_WATCHDOG_H */