hv_drv_Watchdog.c 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /**
  2. * @file hv_drv_Watchdog.c
  3. * @brief wdg driver chip file.
  4. *
  5. * @author HiView SoC Software Team
  6. * @version 1.0.0
  7. * @date 2023-06-05
  8. * @copyright Copyright(c),2023-6, Hiview Software. All rights reserved.
  9. * </table>
  10. */
  11. #include "hv_vos_Comm.h"
  12. #include "hv_chip_Config.h"
  13. #include "hv_cal_Watchdog.h"
  14. #include "hv_drv_Watchdog.h"
  15. #include "ProjectConfig.h"
  16. /**
  17. * @brief Reload the counter register.
  18. */
  19. void Hv_Drv_WDG_Feed(UINT32 uiTimeoutMs)
  20. {
  21. return Hv_Cal_WDG_Feed(uiTimeoutMs);
  22. }
  23. /**
  24. * @brief WDG Enable
  25. */
  26. void Hv_Drv_WDG_Enable(void)
  27. {
  28. #ifdef CONFIG_USER_WATCHDOG_ON
  29. return Hv_Cal_WDG_Enable();
  30. #else
  31. return;
  32. #endif
  33. }
  34. /**
  35. * @brief WDG Disable
  36. */
  37. void Hv_Drv_WDG_Disable(void)
  38. {
  39. return Hv_Cal_WDG_Disable();
  40. }
  41. /**
  42. * @brief WDG Cleanup
  43. */
  44. void Hv_Drv_WDG_Cleanup(void)
  45. {
  46. return Hv_Cal_WDG_Cleanup();
  47. }
  48. /**
  49. * @brief set early wakeup calback.
  50. */
  51. void Hv_Drv_WDG_SetEarlyWakeup(HV_CAL_WDG_EARLY_INTERRUPT_FN fEarlyInterruptFn)
  52. {
  53. return Hv_Cal_WDG_SetEarlyWakeup(fEarlyInterruptFn);
  54. }