1 Star 0 Fork 5.1K

baiyun / docs

forked from OpenHarmony / docs 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
hdf_device_desc-h.md 11.99 KB
一键复制 编辑 原始数据 按行查看 历史
wenjun 提交于 2020-09-08 10:08 . add OpenHarmony 1.0 baseline

hdf_device_desc.h

Overview

Related Modules:

Core

Description:

Declares functions related to driver loading, service obtaining, and power management.

Since:

1.0

Summary

Data Structures

Data Structure Name

Description

HdfDeviceObject

Defines the device object.

HdfDeviceIoClient

Defines the client object structure of the I/O service.

IDeviceIoService

Defines the driver service.

SubscriberCallback

Called when the driver subscribes to other driver services.

IPowerEventListener

Defines the power management functions provided by the HDF for the driver.

HdfDriverEntry

Defines the entry structure of the driver in the HDF.

Macros

Macro Name and Value

Description

MAX_PRIORITY_NUM   200

The maximum priority for loading the host and device.

HDF_INIT(module)   HDF_DRIVER_INIT(module)

Registers the driver with the HDF.

Enumerations

Enumeration Name

Description

ServicePolicy {   SERVICE_POLICY_NONE = 0, SERVICE_POLICY_PUBLIC, SERVICE_POLICY_CAPACITY, SERVICE_POLICY_FRIENDLY,   SERVICE_POLICY_PRIVATE, SERVICE_POLICY_INVALID }

Enumerates policies for releasing driver services developed based on the HDF.

DevicePreload { DEVICE_PRELOAD_ENABLE = 0, DEVICE_PRELOAD_DISABLE, DEVICE_PRELOAD_INVALID }

Enumerates driver loading policies.

Functions

Function Name

Description

DevSvcManagerClntGetService (const char *svcName)

const struct HdfObject

Obtains the driver service object based on a driver service name.

HdfDeviceGetServiceName (const struct HdfDeviceObject *deviceObject)

const char * 

Obtains the service name of a driver.

HdfDeviceSubscribeService (struct HdfDeviceObject *deviceObject, const char *serviceName, struct SubscriberCallback callback)

int32_t 

Subscribes to a driver service.

HdfDeviceSendEvent (const struct HdfDeviceObject *deviceObject, uint32_t id, const struct HdfSBuf *data)

int32_t 

Sends event messages.

HdfDeviceSendEventToClient (const struct HdfDeviceIoClient *client, uint32_t id, const struct HdfSBuf *data)

int32_t 

Sends an event message to a specified client object.

1
https://gitee.com/baiyunhaishang/docs.git
git@gitee.com:baiyunhaishang/docs.git
baiyunhaishang
docs
docs
master

搜索帮助