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