pm.h 542 B

123456789101112131415161718192021222324252627282930
  1. #ifndef __PM_H__
  2. #define __PM_H__
  3. #include <stdint.h>
  4. #ifdef __debug__
  5. #define PM_WUT_PERIOD 10
  6. #else
  7. #define PM_WUT_PERIOD 30
  8. #endif
  9. #define PM_WAKUP_EVT_KEY (1ul)
  10. #define PM_WAKUP_EVT_WUT (2ul)
  11. // 初始化低功耗管理模块
  12. void pm_init(void);
  13. // 获取一个锁
  14. int8_t pm_get_lock(const char *name);
  15. // 释放一个锁
  16. int8_t pm_release_lock(const char *name);
  17. // 进入低功耗模式
  18. void pm_enter_low_power_mode(void);
  19. uint32_t pm_get_wakeup_events(void);
  20. void pm_clr_wakeup_events(uint32_t mask);
  21. #endif // __PM_H__