同步操作将从 OpenHarmony/docs 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
Defines an API for HDF driver developers to read driver configuration information.
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
Defines the attributes of a tree node in the configuration tree. |
|
Provides functions for obtaining information about the device resource configuration tree. |
DEV_RES_NODE_FOR_EACH_ATTR(node, attr) for ((attr) = (node)->attrData; (attr) != NULL; (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) != NULL; (childNode) = (childNode)->sibling) |
Traverses the child nodes of the current configuration tree node. |
DeviceResourceType { HDF_CONFIG_SOURCE = 0, INVALID } |
struct DeviceResourceIface * Obtains the device resource interface handle of the corresponding configuration tree type. |
#define DEV_RES_NODE_FOR_EACH_ATTR( node, attr ) for ((attr) = (node)->attrData; (attr) != [NULL](zh-cn_topic_0000001055198076.md#ga070d2ce7b6bb7e5c05602aa8c308d0c4); (attr) = (attr)->next)
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. |
#define DEV_RES_NODE_FOR_EACH_CHILD_NODE( node, childNode ) for ((childNode) = (node)->child; (childNode) != [NULL](zh-cn_topic_0000001055198076.md#ga070d2ce7b6bb7e5c05602aa8c308d0c4); (childNode) = (childNode)->sibling)
Description:
Traverses the child nodes of the current configuration tree node.
This operation is a for loop in essence.
Parameters:
node | Indicates the configuration tree node to traverse. |
childNode | Indicates the traversed child nodes. |
enum [DeviceResourceType](DriverConfig.md#ga09c9585a5d95c79fd5ee4bd8863ba66a)
Description:
Enumerates configuration file types.
HDF_CONFIG_SOURCE | |
INVALID |
struct [DeviceResourceIface](DeviceResourceIface.md)* DeviceResourceGetIfaceInstance ([DeviceResourceType](DriverConfig.md#ga09c9585a5d95c79fd5ee4bd8863ba66a) type)
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:
Returns the device resource interface handle if the operation is successful; returns NULL otherwise.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。