SLEEP.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /********************************** (C) COPYRIGHT *******************************
  2. * File Name : SLEEP.h
  3. * Author : WCH
  4. * Version : V1.0
  5. * Date : 2018/11/12
  6. * Description :
  7. * Copyright (c) 2021 Nanjing Qinheng Microelectronics Co., Ltd.
  8. * SPDX-License-Identifier: Apache-2.0
  9. *******************************************************************************/
  10. /******************************************************************************/
  11. #ifndef __SLEEP_H
  12. #define __SLEEP_H
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16. /*********************************************************************
  17. * GLOBAL VARIABLES
  18. */
  19. /*********************************************************************
  20. * FUNCTIONS
  21. */
  22. /**
  23. * @brief 配置睡眠唤醒的方式 - RTC唤醒,触发模式
  24. */
  25. extern void HAL_SleepInit(void);
  26. /**
  27. * @brief 启动睡眠
  28. *
  29. * @param time - 唤醒的时间点(RTC绝对值)
  30. *
  31. * @return state.
  32. */
  33. extern uint32_t CH58X_LowPower(uint32_t time);
  34. /*********************************************************************
  35. *********************************************************************/
  36. #ifdef __cplusplus
  37. }
  38. #endif
  39. #endif