hw_module_t Struct Reference
#include <
hardware.h
>
Data Fields |
|
uint32_t | tag |
uint16_t | module_api_version |
uint16_t | hal_api_version |
const char * | id |
const char * | name |
const char * | author |
struct hw_module_methods_t * | methods |
void * | dso |
uint32_t | reserved [32-7] |
Detailed Description
Every hardware module must have a data structure named HAL_MODULE_INFO_SYM and the fields of this data structure must begin with hw_module_t followed by module specific information.
Definition at line 86 of file hardware.h .
Field Documentation
const char* author |
Author/owner/implementor of the module
Definition at line 139 of file hardware.h .
void* dso |
module's dso
Definition at line 145 of file hardware.h .
uint16_t hal_api_version |
version_major/version_minor defines are supplied here for temporary source code compatibility. They will be removed in the next version. ALL clients must convert to the new version format. The API version of the HAL module interface. This is meant to version the hw_module_t , hw_module_methods_t , and hw_device_t structures and definitions.
The HAL interface owns this field. Module users/implementations must NOT rely on this value for version information.
Presently, 0 is the only valid value.
Definition at line 129 of file hardware.h .
const char* id |
Identifier of module
Definition at line 133 of file hardware.h .
struct hw_module_methods_t * methods |
Modules methods
Definition at line 142 of file hardware.h .
uint16_t module_api_version |
The API version of the implemented module. The module owner is responsible for updating the version when a module interface has changed.
The derived modules such as gralloc and audio own and manage this field. The module user must interpret the version field to decide whether or not to inter-operate with the supplied module implementation. For example, SurfaceFlinger is responsible for making sure that it knows how to manage different versions of the gralloc-module API, and AudioFlinger must know how to do the same for audio-module API.
The module API version should include a major and a minor component. For example, version 1.0 could be represented as 0x0100. This format implies that versions 0x0100-0x01ff are all API-compatible.
In the future, libhardware will expose a hw_get_module_version() (or equivalent) function that will take minimum/maximum supported versions as arguments and would be able to reject modules with versions outside of the supplied range.
Definition at line 111 of file hardware.h .
const char* name |
Name of this module
Definition at line 136 of file hardware.h .
uint32_t reserved[32-7] |
padding to 128 bytes, reserved for future use
Definition at line 151 of file hardware.h .
uint32_t tag |
tag must be initialized to HARDWARE_MODULE_TAG
Definition at line 88 of file hardware.h .
The documentation for this struct was generated from the following file:
- hardware/libhardware/include/hardware/ hardware.h