openharmony_ci b371ace284 !80 merge master into master
fix: abandon syscap

Created-by: kong-wei-111
Commit-by: yanghang
Merged-by: openharmony_ci
Description: > 请检查PR是否满足[《代码合入流程指导和规范》](https://gitee.com/openharmony/powermgr_power_manager/wikis/issue-commit-pr-standard) , 否则将不会审查通过。

**【关联Issue】**
https://gitcode.com/openharmony/powermgr_powermgr_lite/issues/52

**【修改描述】**
废弃冗余syscap

**【验证结果】**



See merge request: openharmony/powermgr_powermgr_lite!80
2025-12-09 15:59:00 +08:00
2023-07-21 15:15:33 +08:00
2024-12-04 11:08:23 +08:00
2024-04-23 14:42:34 +00:00
2025-08-16 21:55:52 +08:00
2022-08-30 14:18:34 +08:00
2025-12-09 10:10:22 +08:00
2021-07-29 17:40:58 +08:00

Lite Power Manager

Introduction

The lite power manager provides the following capabilities:

  1. Managing sleep and wakeup locks.
  2. Keeping the device screen always on using a lock

Figure 1 Lite power manager architecture

Directory Structure

base/powermgr/powermgr_lite
├── figures           # Architecture figures
├── frameworks        # Frameworks
│   ├── include       # Header files
│   └── src           # Source files
├── interfaces        # APIs
│   ├── innerkits     # Internal APIs
│   └── kits          # External APIs
├── services          # Services
│   ├── include       # Header files
│   └── src           # Source files
└── utils             # Utilities
    ├── include       # Header files
    └── src           # Source files

Usage

Available APIs

The following table lists the JavaScript APIs provided by the lite power manager.

API

Description

RunningLock *CreateRunningLock(const char *name, RunningLockType type, RunningLockFlag flag)

Creates a Runninglock object.

void DestroyRunningLock(const RunningLock *lock)

Destroys an Runninglock object.

BOOL AcquireRunningLock(const RunningLock *lock)

Obtains a Runninglock object.

BOOL ReleaseRunningLock(const RunningLock *lock)

Releases a Runninglock object.

Usage Guidelines

Runninglock Management

The lite power manager provides APIs to create, obtain, and release Runninglock objects.

The sample code is as follows:

const RunningLock *lock = CreateRunningLock("runinglock_example", RUNNINGLOCK_BACKGROUND, RUNNINGLOCK_FLAG_NONE);
if (lock == NULL) {
   return;
}
BOOL ret = AcquireRunningLock(lock);
if (ret == FLASE) {
   DestroyRunningLock(lock);
   return;
}
ReleaseRunningLock(lock);
DestroyRunningLock(lock); // Must release runninglock before destroyed

Repositories Involved

Power management subsystem

powermgr_power_manager

powermgr_display_manager

powermgr_battery_manager

powermgr_thermal_manager

powermgr_battery_statistics

powermgr_battery_lite

powermgr_powermgr_lite

S
Description
暂无描述
Readme 647 KiB
Languages
C 85.1%
C++ 13.8%
CMake 1.1%