power_module 结构体参考文档
power_module 结构体参考文档
#include <
power.h
>
数据字段 |
|
struct hw_module_t | 常见 |
void(* | init )(struct power_module *module) |
void(* | setInteractive )(struct power_module *module, int on) |
void(* | powerHint )(struct power_module *module, power_hint_t hint, void *data) |
void(* | setFeature )(struct power_module *module, feature_t feature, int state) |
int(* | get_platform_low_power_stats )(struct power_module *module, power_state_platform_sleep_state_t *list) |
ssize_t(* | get_number_of_platform_modes )(struct power_module *module) |
int(* | get_voter_list )(struct power_module *module, size_t *voter) |
详细说明
每个硬件模块都必须有一个名为 HAL_MODULE_INFO_SYM 的数据结构,并且此数据结构的字段必须以 hw_module_t 开头,后跟模块专用信息。
字段文档
struct hw_module_t common |
ssize_t(* get_number_of_platform_modes)(struct power_module *module) |
int(* get_platform_low_power_stats)(struct power_module *module, power_state_platform_sleep_state_t *list) |
int(* get_voter_list)(struct power_module *module, size_t *voter) |
void(* init)(struct power_module *module) |
void(* powerHint)(struct power_module *module, power_hint_t hint, void *data) |
void(* setFeature)(struct power_module *module, feature_t feature, int state) |
void(* setInteractive)(struct power_module *module, int on) |
此结构体的文档是根据以下文件生成的:
- hardware/libhardware/include/hardware/ power.h