加入收藏
举报
02-14 20:02
#0
文件名称:
hdf_device_desc-h.md
所在目录:
Openharmony v1.0 / docs / api / api-SmartVision-Devices
文件大小:
11.99 KB
下载地址:
fenwii/OpenHarmony
   
免责声明:本网站仅提供指向 GitHub 上的文件的链接,所有文件的版权归原作者所有,本网站不对文件内容的合法性、准确性或安全性承担任何责任。
文本预览:
# hdf\_device\_desc.h
## **Overview**
**Related Modules:**
[Core](Core.md)
**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.


点赞 回复
回帖
支持markdown部分语法 ?