DriverConfig
During version compilation of the device resource source file defined by developers, the compilation tool (for example, the compilation tool of the HCS file is hc-gen) generates bytecodes. When the HDF starts, it transfers the bytecode memory to the DriverConfig module. The DriverConfig module converts the bytecodes into a configuration tree and provides an API for developers to query the tree.
Since:
1.0
Version:
1.0
Summary
Files
Data Structures
Defines the attributes of a tree node in the configuration tree. |
|
Provides functions for obtaining information about the device resource configuration tree. |
Macros
DEV_RES_NODE_FOR_EACH_ATTR(node, attr) for ((attr) = (node)->attrData; (attr) != ; (attr) = (attr)->next) |
Traverses the attributes of the current configuration tree node. |
DEV_RES_NODE_FOR_EACH_CHILD_NODE(node, childNode) for ((childNode) = (node)->child; (childNode) != ; (childNode) = (childNode)->sibling) |
Traverses the child nodes of the current configuration tree node. |
Functions
(DeviceResourceType type) |
Obtains the device resource interface handle of the corresponding configuration tree type. |
Details
Macro Definition Documentation
DEV_RES_NODE_FOR_EACH_ATTR
Description:
Traverses the attributes of the current configuration tree node.
This operation is a for loop in essence.
Parameters:
node | Indicates the configuration tree node to traverse. |
attr | Indicates the traversed attributes. |
Description:
Traverses the child nodes of the current configuration tree node.
This operation is a for loop in essence.
Parameters:
Enumeration Type Documentation
DeviceResourceType
Description:
Enumerates configuration file types.
HDF_CONFIG_SOURCE | |
INVALID |
Function Documentation
DeviceResourceGetIfaceInstance()
Description:
Obtains the device resource interface handle of the corresponding configuration tree type.
You can use the obtained handle to use the device resource interface.
Parameters:
type | Indicates the type of the device resource interface handle to obtain. |
Returns the device resource interface handle if the operation is successful; returns NULL otherwise.