diff --git a/zh-cn/device-dev/reference/hdi-apis/_event_package.md b/zh-cn/device-dev/reference/hdi-apis/_event_package.md index 6ea01ee6fa3e3428bf43b1733edfcd778a850151..d044d04799d0a1a4c8c726025cbb3624db1a7bf5 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_event_package.md +++ b/zh-cn/device-dev/reference/hdi-apis/_event_package.md @@ -1,4 +1,4 @@ -# EventPackage +# InputEventPackage ## **概述** @@ -23,7 +23,7 @@ ## **详细描述** -input事件数据包结构。 +Input事件数据包结构。 ## **类成员变量说明** diff --git a/zh-cn/device-dev/reference/hdi-apis/_i_input_interface.md b/zh-cn/device-dev/reference/hdi-apis/_i_input_interface.md index d2308b6bd9da78210c7a2c186fadac3d09bff0e3..cf3f527b4fe26462524e33a0bc2e87b7a294d5e4 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_i_input_interface.md +++ b/zh-cn/device-dev/reference/hdi-apis/_i_input_interface.md @@ -15,14 +15,14 @@ | Public 属性 | 描述 | | -------- | -------- | -| [iInputManager](#iinputmanager) | input设备的设备管理接口。 | -| [iInputController](#iinputcontroller) | input设备的业务控制接口。 | -| [iInputReporter](#iinputreporter) | input设备的数据上报接口。 | +| [iInputManager](#iinputmanager) | Input设备的设备管理接口。 | +| [iInputController](#iinputcontroller) | Input设备的业务控制接口。 | +| [iInputReporter](#iinputreporter) | Input设备的数据上报接口。 | ## **详细描述** -定义用于提供输入设备驱动能力的接口。 +定义用于提供Input设备驱动程序功能的接口。 ## **类成员变量说明** @@ -37,7 +37,7 @@ InputController* IInputInterface::iInputController **描述:** -input设备的业务控制接口 +Input设备的业务控制接口。 ### iInputManager @@ -49,7 +49,7 @@ InputManager* IInputInterface::iInputManager **描述:** -input设备的设备管理接口 +Input设备的设备管理接口。 ### iInputReporter @@ -61,4 +61,4 @@ InputReporter* IInputInterface::iInputReporter **描述:** -input设备的数据上报接口 +Input设备的数据上报接口。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_input.md b/zh-cn/device-dev/reference/hdi-apis/_input.md index 4d1ff3164d7e3640000029d9adc9eb3dc81b160b..0cf606855370ad1c52641c090be4ff1808766346 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_input.md +++ b/zh-cn/device-dev/reference/hdi-apis/_input.md @@ -8,24 +8,24 @@ | 文件 | 描述 | | -------- | -------- | -| [input_controller.h](input__controller_8h.md) | 描述input设备业务控制相关的接口声明。 | -| [input_manager.h](input__manager_8h.md) | 描述input设备管理相关的接口声明。 | -| [input_reporter.h](input__reporter_8h.md) | 描述input设备数据上报相关的接口声明。 | -| [input_type.h](input__type_8h.md) | input设备相关的类型定义,定义了input设备驱动接口所使用的结构体及枚举类型。 | +| [input_controller.h](input__controller_8h.md) | 描述Input设备业务控制相关的接口声明。 | +| [input_manager.h](input__manager_8h.md) | 描述Input设备管理相关的接口声明。 | +| [input_reporter.h](input__reporter_8h.md) | 描述Input设备数据上报相关的接口声明。 | +| [input_type.h](input__type_8h.md) | Input设备相关的类型定义,定义了Input设备驱动接口所使用的结构体及枚举类型。 | ### 类 | 类 | 描述 | | -------- | -------- | -| [InputController](_input_controller.md) | 提供input设备业务控制相关的接口。 [更多...](_input_controller.md) | -| [InputManager](_input_manager.md) | 提供input设备管理相关的接口。 [更多...](_input_manager.md) | +| [InputController](_input_controller.md) | 提供Input设备业务控制相关的接口。 [更多...](_input_controller.md) | +| [InputManager](_input_manager.md) | 提供Input设备管理相关的接口。 [更多...](_input_manager.md) | | [IInputInterface](_i_input_interface.md) | 定义用于提供输入设备驱动能力的接口。[更多...](_i_input_interface.md) | -| [InputReporter](_input_reporter.md) | 提供input设备数据上报相关的接口。 [更多...](_input_reporter.md) | -| [EventPackage](_event_package.md) | input事件数据包结构 [更多...](_event_package.md) | -| [InputReportEventCb](_input_report_event_cb.md) | 此结构体定义了输入事件回调函数并提供给input服务使用 [更多...](_input_report_event_cb.md) | -| [DeviceInfo](_device_info.md) | input设备基础设备信息 [更多...](_device_info.md) | -| [InputExtraCmd](_input_extra_cmd.md) | 扩展指令的数据结构 [更多...](_input_extra_cmd.md) | +| [InputReporter](_input_reporter.md) | 提供Input设备数据上报相关的接口。 [更多...](_input_reporter.md) | +| [InputEventPackage](_event_package.md) | Input事件数据包结构。 [更多...](_event_package.md) | +| [InputReportEventCb](_input_report_event_cb.md) | 此结构体定义了输入事件回调函数并提供给Input服务使用。 [更多...](_input_report_event_cb.md) | +| [DeviceInfo](_device_info.md) | Input设备基础设备信息。 [更多...](_device_info.md) | +| [InputExtraCmd](_input_extra_cmd.md) | 扩展指令的数据结构。 [更多...](_input_extra_cmd.md) | ### 宏定义 @@ -33,11 +33,16 @@ | 宏定义 | 描述 | | -------- | -------- | | **MAX_INPUT_DEV_NUM**   32 | Input设备最大数量。 | -| **MAX_NODE_PATH_LEN**   64 | 节点路径最大长度。 | +| **DEV_NAME_LEN**   64 | Input设备名称长度。 | | **CHIP_INFO_LEN**   10 | 芯片信息长度。 | | **CHIP_NAME_LEN**   10 | 芯片名称长度。 | | **VENDOR_NAME_LEN**   10 | 厂商名称长度。 | | **SELF_TEST_RESULT_LEN**   20 | 自测结果长度。 | +| **DEV_MANAGER_SERVICE_NAME**   "hdf_input_host" | Input设备节点服务名称。 | +| **DIV_ROUND_UP(nr, d)**  (((nr) + (d) - 1) / (d)) | 向上取整计算公式。| +| **BYTE_HAS_BITS**  8 | 一个字节所包含的比特数。 | +| **BITS_TO_UINT64(count)**  DIV_ROUND_UP(count, BYTE_HAS_BITS * sizeof(uint64_t)) | 比特与64位无符号整数的转换公式。 | +| **HDF_FF_CNT**  (0x7f + 1) | Input设备发送力反馈命令的数量最大值。| ### 枚举 @@ -45,7 +50,7 @@ | 枚举 | 描述 | | -------- | -------- | | [RetStatus](#retstatus) { INPUT_SUCCESS = 0, INPUT_FAILURE = -1, INPUT_INVALID_PARAM = -2, INPUT_NOMEM = -3,   INPUT_NULL_PTR = -4, INPUT_TIMEOUT = -5, INPUT_UNSUPPORTED = -6 } | 定义返回值类型 [更多...](#retstatus) | -| [InputDevType](#inputdevtype) { INDEV_TYPE_TOUCH, INDEV_TYPE_KEY, INDEV_TYPE_KEYBOARD, INDEV_TYPE_MOUSE,   INDEV_TYPE_BUTTON, INDEV_TYPE_CROWN, INDEV_TYPE_ENCODER, INDEV_TYPE_UNKNOWN } | 定义input设备类型 [更多...](#inputdevtype) | +| [InputDevType](#inputdevtype) { INDEV_TYPE_TOUCH, INDEV_TYPE_KEY, INDEV_TYPE_KEYBOARD, INDEV_TYPE_MOUSE,   INDEV_TYPE_BUTTON, INDEV_TYPE_CROWN, INDEV_TYPE_ENCODER, INDEV_TYPE_UNKNOWN } | 定义Input设备类型 [更多...](#inputdevtype) | | [PowerStatus](#powerstatus) { INPUT_RESUME, INPUT_SUSPEND, INPUT_LOW_POWER, INPUT_POWER_STATUS_UNKNOWN } | 定义电源状态 [更多...](#powerstatus) | | [CapacitanceTest](#capacitancetest) { BASE_TEST, FULL_TEST, MMI_TEST, RUNNING_TEST,   TEST_TYPE_UNKNOWN } | 定义容值测试类型 [更多...](#capacitancetest) | @@ -54,14 +59,15 @@ | 函数 | 描述 | | -------- | -------- | -| [GetInputInterface](#getinputinterface) ([IInputInterface](_i_input_interface.md) \*\*interface) | input服务通过调用此接口获取操作input设备的所有接口。 [更多...](#getinputinterface) | +| [GetInputInterface](#getinputinterface) ([IInputInterface](_i_input_interface.md) \*\*interface) | Input服务通过调用此接口获取操作Input设备的所有接口。 [更多...](#getinputinterface) | +| [ReleaseInputInterface](#releaseinputinterface) ([IInputInterface](_i_input_interface.md) \*\*inputInterface) | Input服务通过调用此接口释放操作Input设备的所有接口。 [更多...](#releaseinputinterface) | ## **详细描述** Input模块驱动接口声明。 -本模块为Input服务提供相关驱动接口,包括input设备的打开和关闭、input事件获取、设备信息查询、回调函数注册、特性状态控制等接口。 +本模块为Input服务提供相关驱动接口,包括Input设备的打开和关闭、Input事件获取、设备信息查询、回调函数注册、特性状态控制等接口。 **Since:** @@ -171,13 +177,44 @@ int32_t GetInputInterface (IInputInterface **interface) **描述:** -Input服务通过调用此接口获取操作input设备的所有接口。 +Input服务通过调用此接口获取操作Input设备的所有接口。 **参数:** | 名称 | 描述 | | -------- | -------- | -| interface | 对input设备进行接口操作的指针,通常在input服务启动后,通过调用此函数获取input设备操作接口 | +| interface | 对Input设备进行接口操作的指针,通常在Input服务启动后,通过调用此函数获取Input设备操作接口。 | + +**返回:** + +INPUT_SUCCESS 表示执行成功。 + +其他值表示执行失败,具体错误码查看**RetSatus**。 + +**Since:** + +1.0 + +**Version:** + +1.0 + +### ReleaseInputInterface() + + +``` +int32_t ReleaseInputInterface (IInputInterface *inputInterface) +``` + +**描述:** + +Input服务通过调用此接口释放操作Input设备的所有接口。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| inputInterface| 对Input设备进行接口操作的指针。 | **返回:** diff --git a/zh-cn/device-dev/reference/hdi-apis/_input_controller.md b/zh-cn/device-dev/reference/hdi-apis/_input_controller.md index 5cdf213f3862f6331c2e0f33241db20fab120715..d70cca07b889bad1e44b843adffde4a93db1878f 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_input_controller.md +++ b/zh-cn/device-dev/reference/hdi-apis/_input_controller.md @@ -17,7 +17,7 @@ | -------- | -------- | | ( [SetPowerStatus](#setpowerstatus) )(uint32_t devIndex, uint32_t status) | 设置电源状态 [更多...](#setpowerstatus) | | ( [GetPowerStatus](#getpowerstatus) )(uint32_t devIndex, uint32_t \*status) | 获取电源状态 [更多...](#getpowerstatus) | -| ( [GetDeviceType](#getdevicetype) )(uint32_t devIndex, uint32_t \*deviceType) | 获取devIndex对应的input设备的类型 [更多...](#getdevicetype) | +| ( [GetDeviceType](#getdevicetype) )(uint32_t devIndex, uint32_t \*deviceType) | 获取devIndex对应的Input设备的类型 [更多...](#getdevicetype) | | ( [GetChipInfo](#getchipinfo) )(uint32_t devIndex, char \*chipInfo, uint32_t length) | 获取器件对应的编码信息 [更多...](#getchipinfo) | | ( [GetVendorName](#getvendorname) )(uint32_t devIndex, char \*vendorName, uint32_t length) | 获取devIndex对应的模组厂商名 [更多...](#getvendorname) | | ( [GetChipName](#getchipname) )(uint32_t devIndex, char \*chipName, uint32_t length) | 获取devIndex对应的驱动芯片名 [更多...](#getchipname) | @@ -28,7 +28,7 @@ ## **详细描述** -提供input设备业务控制相关的接口。 +提供Input设备业务控制相关的接口。 此类接口包含电源状态的设置、特性的使能、器件信息的获取,以及产线相关的测试功能接口。 @@ -45,7 +45,7 @@ int32_t(* InputController::GetChipInfo) (uint32_t devIndex, char *chipInfo, uint **描述:** -获取器件对应的编码信息 +获取器件对应的编码信息。 一款产品通常会有多家模组和Driver IC,上层应用如果关注具体器件型号,则通过此接口来获取。 @@ -53,15 +53,15 @@ int32_t(* InputController::GetChipInfo) (uint32_t devIndex, char *chipInfo, uint | 名称 | 描述 | | -------- | -------- | -| devIndex | Input设备索引,用于标志多个input设备,取值从0开始,最多支持32个设备。 | -| chipInfo | 获取的对应设备索引的器件编码信息。 | -| length | 保存器件芯片信息的内存长度。 | +| devIndex | 输入参数,Input设备索引,用于标志多个Input设备,取值从0开始,最多支持32个设备。 | +| chipInfo | 输出参数,获取的对应设备索引的器件编码信息。 | +| length | 输入参数,保存器件芯片信息的内存长度。 | **返回:** -Returns INPUT_SUCCESS 表示执行成功。 +INPUT_SUCCESS 表示执行成功。 -Returns 其他值表示执行失败,具体错误码查看**RetSatus**。 +其他值表示执行失败,具体错误码查看**RetSatus**。 ### GetChipName @@ -73,21 +73,21 @@ int32_t(* InputController::GetChipName) (uint32_t devIndex, char *chipName, uint **描述:** -获取devIndex对应的驱动芯片名 +获取devIndex对应的驱动芯片名。 **参数:** | 名称 | 描述 | | -------- | -------- | -| devIndex | Input设备索引,用于标志多个input设备,取值从0开始,最多支持32个设备。 | -| chipName | 获取的对应设备索引的驱动芯片名。 | -| length | 保存驱动芯片名的内存长度。 | +| devIndex | 输入参数,Input设备索引,用于标志多个Input设备,取值从0开始,最多支持32个设备。 | +| chipName | 输出参数,获取的对应设备索引的驱动芯片名。 | +| length | 输入参数,保存驱动芯片名的内存长度。 | **返回:** -Returns INPUT_SUCCESS 表示执行成功。 +INPUT_SUCCESS 表示执行成功。 -Returns 其他值表示执行失败,具体错误码查看**RetSatus**。 +其他值表示执行失败,具体错误码查看**RetSatus**。 ### GetDeviceType @@ -99,20 +99,20 @@ int32_t(* InputController::GetDeviceType) (uint32_t devIndex, uint32_t *deviceTy **描述:** -获取devIndex对应的input设备的类型 +获取devIndex对应的Input设备的类型。 **参数:** | 名称 | 描述 | | -------- | -------- | -| devIndex | Input设备索引,用于标志多个input设备,取值从0开始,最多支持32个设备。 | -| deviceType | 获取的对应设备索引的设备类型,具体参考**InputDevType**。 | +| devIndex | 输入参数,Input设备索引,用于标志多个Input设备,取值从0开始,最多支持32个设备。 | +| deviceType | 输出参数,获取的对应设备索引的设备类型,具体参考**InputDevType**。 | **返回:** -Returns INPUT_SUCCESS 表示执行成功。 +INPUT_SUCCESS 表示执行成功。 -Returns 其他值表示执行失败,具体错误码查看**RetSatus**。 +其他值表示执行失败,具体错误码查看**RetSatus**。 ### GetPowerStatus @@ -124,22 +124,22 @@ int32_t(* InputController::GetPowerStatus) (uint32_t devIndex, uint32_t *status) **描述:** -获取电源状态 +获取电源状态。 -在系统休眠或者唤醒时,input服务或电源管理模块获取电源状态,以便驱动IC能正常进入对应的休眠模式。 +在系统休眠或者唤醒时,Input服务或电源管理模块获取电源状态,以便驱动IC能正常进入对应的休眠模式。 **参数:** | 名称 | 描述 | | -------- | -------- | -| devIndex | Input设备索引,用于标志多个input设备,取值从0开始,最多支持32个设备。 | -| status | 获取的对应设备索引的电源状态,具体参考**PowerStatus**。 | +| devIndex | 输入参数,Input设备索引,用于标志多个Input设备,取值从0开始,最多支持32个设备。 | +| status | 输出参数,获取的对应设备索引的电源状态,具体参考[PowerStatus](_input.md#powerstatus)。 | **返回:** -Returns INPUT_SUCCESS 表示执行成功。 +INPUT_SUCCESS 表示执行成功。 -Returns 其他值表示执行失败,具体错误码查看**RetSatus。** +其他值表示执行失败,具体错误码查看**RetSatus。** ### GetVendorName @@ -157,7 +157,7 @@ int32_t(* InputController::GetVendorName) (uint32_t devIndex, char *vendorName, | 名称 | 描述 | | -------- | -------- | -| devIndex | Input设备索引,用于标志多个input设备,取值从0开始,最多支持32个设备。 | +| devIndex | Input设备索引,用于标志多个Input设备,取值从0开始,最多支持32个设备。 | | vendorName | 获取的对应设备索引的模组厂商名。 | | length | 保存模组厂商名的内存长度。 | @@ -177,24 +177,24 @@ int32_t(* InputController::RunCapacitanceTest) (uint32_t devIndex, uint32_t test **描述:** -执行容值自检测试 +执行容值自检测试。 -启动不同检测场景下的容值自检测试,并获取测试结果,容值自检项由器件厂商自定义, 一般包括RawData测试、 \* 短路检测、开路检测、干扰检测、行列差检测等测试项。 +启动不同检测场景下的容值自检测试,并获取测试结果,容值自检项由器件厂商自定义, 一般包括RawData测试、短路检测、开路检测、干扰检测、行列差检测等测试项。 **参数:** | 名称 | 描述 | | -------- | -------- | -| devIndex | Input设备索引,用于标志多个input设备,取值从0开始,最多支持32个设备。 | -| testType | 容值测试的测试类型,具体参考**CapacitanceTest**。 | -| result | 容值测试的结果,成功则输出“SUCCESS”,失败则返回对应的错误提示 。 | -| length | 保存容值测试结果的内存长度。 | +| devIndex | 输入参数,Input设备索引,用于标志多个Input设备,取值从0开始,最多支持32个设备。 | +| testType | 输入参数,容值测试的测试类型,具体参考**CapacitanceTest**。 | +| result | 输出参数,容值测试的结果,成功则输出“SUCC”,失败则返回对应的错误提示。 | +| length | 输入参数,保存容值测试结果的内存长度。 | **返回:** -Returns INPUT_SUCCESS 表示执行成功。 +INPUT_SUCCESS 表示执行成功。 -Returns 其他值表示执行失败,具体错误码查看**RetSatus**。 +其他值表示执行失败,具体错误码查看**RetSatus**。 ### RunExtraCommand @@ -206,20 +206,20 @@ int32_t(* InputController::RunExtraCommand) (uint32_t devIndex, InputExtraCmd *c **描述:** -执行拓展指令 +执行拓展指令。 **参数:** | 名称 | 描述 | | -------- | -------- | -| devIndex | Input设备索引,用于标志多个input设备,取值从0开始,最多支持32个设备。 | -| cmd | 拓展指令数据包,包括指令编码及参数,具体参考**InputExtraCmd**。 | +| devIndex | 输入参数,Input设备索引,用于标志多个Input设备,取值从0开始,最多支持32个设备。 | +| cmd | 输入参数,拓展指令数据包,包括指令编码及参数,具体参考**InputExtraCmd**。 | **返回:** -Returns INPUT_SUCCESS 表示执行成功。 +INPUT_SUCCESS 表示执行成功。 -Returns 其他值表示执行失败,具体错误码查看**RetSatus**。 +其他值表示执行失败,具体错误码查看**RetSatus**。 ### SetGestureMode @@ -231,22 +231,22 @@ int32_t(* InputController::SetGestureMode) (uint32_t devIndex, uint32_t gestureM **描述:** -设置手势模式 +设置手势模式。 -上层应用开关手势模式,即设置手势模式的对应使能bit +上层应用开关手势模式,即设置手势模式的对应使能bit。 **参数:** | 名称 | 描述 | | -------- | -------- | -| devIndex | Input设备索引,用于标志多个input设备,取值从0开始,最多支持32个设备。 | -| gestureMode | 手势模式的开关状态 | +| devIndex | 输入参数,Input设备索引,用于标志多个Input设备,取值从0开始,最多支持32个设备。 | +| gestureMode | 输入参数,手势模式的开关状态。 | **返回:** -Returns INPUT_SUCCESS 表示执行成功。 +INPUT_SUCCESS 表示执行成功。 -Returns 其他值表示执行失败,具体错误码查看**RetSatus**。 +其他值表示执行失败,具体错误码查看**RetSatus**。 ### SetPowerStatus @@ -258,19 +258,19 @@ int32_t(* InputController::SetPowerStatus) (uint32_t devIndex, uint32_t status) **描述:** -设置电源状态 +设置电源状态。 -在系统休眠或者唤醒时,input服务或电源管理模块设置电源状态,以使驱动IC能正常进入对应的休眠模式。 +在系统休眠或者唤醒时,Input服务或电源管理模块设置电源状态,以使驱动IC能正常进入对应的休眠模式。 **参数:** | 名称 | 描述 | | -------- | -------- | -| devIndex | Input设备索引,用于标志多个input设备,取值从0开始,最多支持32个设备。 | -| status | 设置的电源状态,input服务控制input设备进入resume或者suspend等状态[PowerStatus](_input.md#powerstatus)。 | +| devIndex | 输入参数,Input设备索引,用于标志多个Input设备,取值从0开始,最多支持32个设备。 | +| status | 输入参数,设置的电源状态,Input服务控制Input设备进入resume或者suspend等状态[PowerStatus](_input.md#powerstatus)。 | **返回:** -Returns INPUT_SUCCESS 表示执行成功。 +INPUT_SUCCESS 表示执行成功。 -Returns 其他值表示执行失败,具体错误码查看**RetSatus**。 +其他值表示执行失败,具体错误码查看**RetSatus**。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_input_manager.md b/zh-cn/device-dev/reference/hdi-apis/_input_manager.md index e1299baf018fe62bc5532fc4db51be5a7d99db34..a70e520d598b2f89eccd82e8f0facc1d0522e67f 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_input_manager.md +++ b/zh-cn/device-dev/reference/hdi-apis/_input_manager.md @@ -15,18 +15,18 @@ | Public 属性 | 描述 | | -------- | -------- | -| ( [ScanInputDevice](#scaninputdevice) )(DevDesc \*staArr, uint32_t arrLen) | input服务用于扫描所有在线设备。 [更多...](#scaninputdevice) | -| ( [OpenInputDevice](#openinputdevice) )(uint32_t devIndex) | input服务打开对应设备的设备文件 [更多...](#openinputdevice) | -| ( [CloseInputDevice](#closeinputdevice) )(uint32_t devIndex) | input服务关闭对应设备的设备文件 [更多...](#closeinputdevice) | -| ( [GetInputDevice](#getinputdevice) )(uint32_t devIndex, [DeviceInfo](_device_info.md) \*\*devInfo) | input服务获取对应ID的设备信息 [更多...](#getinputdevice) | -| ( [GetInputDeviceList](#getinputdevicelist) )(uint32_t \*devNum, [DeviceInfo](_device_info.md) \*\*devList, uint32_t size) | input服务获取所有input设备列表的设备信息 [更多...](#getinputdevicelist) | +| ( [ScanInputDevice](#scaninputdevice) )(DevDesc \*staArr, uint32_t arrLen) | Input服务用于扫描所有在线设备。 [更多...](#scaninputdevice) | +| ( [OpenInputDevice](#openinputdevice) )(uint32_t devIndex) | Input服务打开对应设备的设备文件 [更多...](#openinputdevice) | +| ( [CloseInputDevice](#closeinputdevice) )(uint32_t devIndex) | Input服务关闭对应设备的设备文件 [更多...](#closeinputdevice) | +| ( [GetInputDevice](#getinputdevice) )(uint32_t devIndex, [DeviceInfo](_device_info.md) \*\*devInfo) | Input服务获取对应ID的设备信息 [更多...](#getinputdevice) | +| ( [GetInputDeviceList](#getinputdevicelist) )(uint32_t \*devNum, [DeviceInfo](_device_info.md) \*\*devList, uint32_t size) | Input服务获取所有Input设备列表的设备信息 [更多...](#getinputdevicelist) | ## **详细描述** -提供input设备管理相关的接口。 +提供Input设备管理相关的接口。 -此类接口包含input设备的扫描、打开和关闭、特定设备信息查询,以及所有设备列表信息获取等接口。 +此类接口包Input设备的扫描、打开和关闭、特定设备信息查询,以及所有设备列表信息获取等接口。 ## **类成员变量说明** @@ -41,70 +41,70 @@ int32_t(* InputManager::CloseInputDevice) (uint32_t devIndex) **描述:** -input服务关闭对应设备的设备文件 +Input服务关闭对应设备的设备文件。 **参数:** | 名称 | 描述 | | -------- | -------- | -| devIndex | Input设备索引,用于标志多个input设备,取值从0开始,最多支持32个设备 | +| devIndex | 输入参数,Input设备索引,用于标志多个Input设备,取值从0开始,最多支持32个设备。| **返回:** -Returns INPUT_SUCCESS 表示执行成功。 +INPUT_SUCCESS 表示执行成功。 -Returns 其他值表示执行失败,具体错误码查看**RetSatus**。 +其他值表示执行失败,具体错误码查看**RetSatus**。 ### GetInputDevice ``` -int32_t(* InputManager::GetInputDevice) (uint32_t devIndex, DeviceInfo **devInfo) +int32_t(* InputManager::GetInputDevice) (uint32_t devIndex, InputDeviceInfo **devInfo) ``` **描述:** -input服务获取对应ID的设备信息。 +Input服务获取对应ID的设备信息。 **参数:** | 名称 | 描述 | | -------- | -------- | -| devIndex | Input设备索引,用于标志多个input设备,取值从0开始,最多支持32个设备。 | -| devInfo | 即devIndex对应设备的设备信息,具体参考**DeviceInfo**。 | +| devIndex | 输入参数,Input设备索引,用于标志多个Input设备,取值从0开始,最多支持32个设备。 | +| devInfo | 输出参数,即devIndex对应的设备的设备信息,具体参考**DeviceInfo**。 | **返回:** -Returns INPUT_SUCCESS 表示执行成功。 +INPUT_SUCCESS 表示执行成功。 -Returns 其他值表示执行失败,具体错误码查看**RetSatus**。 +其他值表示执行失败,具体错误码查看**RetSatus**。 ### GetInputDeviceList ``` -int32_t(* InputManager::GetInputDeviceList) (uint32_t *devNum, DeviceInfo **devList, uint32_t size) +int32_t(* InputManager::GetInputDeviceList) (uint32_t *devNum, InputDeviceInfo **devList, uint32_t size) ``` **描述:** -input服务获取所有input设备列表的设备信息。 +Input服务获取所有Input设备列表的设备信息。 **参数:** | 名称 | 描述 | | -------- | -------- | -| devNum | 当前已经注册过的所有input设备的总数。 | -| devInfo | input设备列表所对应的设备信息,具体参考**DeviceInfo**。 | -| size | 即指定deviceList数组对应的元素个数。 | +| devNum | 输出参数,当前已经注册过的所有Input设备的总数。 | +| devInfo | 输出参数,Input设备列表所对应的设备信息,具体参考**DeviceInfo**。 | +| size | 输入参数,即指定deviceList数组对应的元素个数。| 返回: -Returns INPUT_SUCCESS 表示执行成功。 +INPUT_SUCCESS 表示执行成功。 -Returns 其他值表示执行失败,具体错误码查看**RetSatus**。 +其他值表示执行失败,具体错误码查看**RetSatus**。 ### OpenInputDevice @@ -116,41 +116,41 @@ int32_t(* InputManager::OpenInputDevice) (uint32_t devIndex) **描述:** -input服务打开对应设备的设备文件 +Input服务打开对应设备的设备文件。 **参数:** | 名称 | 描述 | | -------- | -------- | -| devIndex | Input设备索引,用于标志多个input设备,取值从0开始,最多支持32个设备。 | +| devIndex | 输入参数,Input设备索引,用于标志多个Input设备,取值从0开始,最多支持32个设备。 | **返回:** -Returns INPUT_SUCCESS 表示执行成功。 +INPUT_SUCCESS 表示执行成功。 -Returns 其他值表示执行失败,具体错误码查看**RetSatus**。 +其他值表示执行失败,具体错误码查看**RetSatus**。 ### ScanInputDevice ``` -int32_t(* InputManager::ScanInputDevice) (DevDesc *staArr, uint32_t arrLen) +int32_t(* InputManager::ScanInputDevice) (InputDevDesc *staArr, uint32_t arrLen) ``` **描述:** -input服务用于扫描所有在线设备。 +Input服务用于扫描所有在线设备。 **参数:** | 名称 | 描述 | | -------- | -------- | -| staArr | 存放Input设备扫描信息的数组,信息包含设备索引以及设备类型。 | -| arrLen | staArr数组的长度信息。 | +| staArr | 输出参数,存放Input设备扫描信息的数组,信息包含设备索引以及设备类型。 | +| arrLen | 输入参数,staArr数组的长度信息。 | **返回:** -Returns INPUT_SUCCESS 表示执行成功。 +INPUT_SUCCESS 表示执行成功。 -Returns 其他值表示执行失败,具体错误码查看**RetSatus**。 +其他值表示执行失败,具体错误码查看**RetSatus**。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_input_report_event_cb.md b/zh-cn/device-dev/reference/hdi-apis/_input_report_event_cb.md index ae163394876e83ae7fe85f8925c12dae9b2efb6c..3c2d5bddbf54b98e2b32163cb2fa7075b94c807e 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_input_report_event_cb.md +++ b/zh-cn/device-dev/reference/hdi-apis/_input_report_event_cb.md @@ -15,13 +15,13 @@ | Public 属性 | 描述 | | -------- | -------- | -| ( [ReportEventPkgCallback](#reporteventpkgcallback) )(const [EventPackage](_event_package.md) \*\*pkgs, uint32_t count, uint32_t devIndex) | 输入事件数据上报的回调函数 [更多...](#reporteventpkgcallback) | -| ( [ReportHotPlugEventCallback](#reporthotplugeventcallback) )(const HotPlugEvent \*event) | 热插拔事件上报的回调函数 [更多...](#reporthotplugeventcallback) | +| ( [ReportEventPkgCallback](#reporteventpkgcallback) )(const [InputEventPackage](_event_package.md) \*\*pkgs, uint32_t count, uint32_t devIndex) | 输入事件数据上报的回调函数。 [更多...](#reporteventpkgcallback) | +| ( [ReportHotPlugEventCallback](#reporthotplugeventcallback) )(const HotPlugEvent \*event) | 热插拔事件上报的回调函数。 [更多...](#reporthotplugeventcallback) | ## **详细描述** -此结构体定义了输入事件回调函数并提供给input服务使用。 +此结构体定义了输入事件回调函数并提供给Input服务使用。 ## **类成员变量说明** @@ -31,20 +31,20 @@ ``` -void(* InputReportEventCb::ReportEventPkgCallback) (const EventPackage **pkgs, uint32_t count, uint32_t devIndex) +void(* InputReportEventCb::ReportEventPkgCallback) (const InputEventPackage **pkgs, uint32_t count, uint32_t devIndex) ``` **描述:** -输入事件数据上报的回调函数 +输入事件数据上报的回调函数。 **参数:** | 名称 | 描述 | | -------- | -------- | -| eventData | 驱动上报的input事件数据。 | +| eventData | 驱动上报的Input事件数据。 | | count | Input事件数据包的个数。 | -| devIndex | Input设备索引,用于标志多个input设备,取值从0开始,最多支持32个设备。 | +| devIndex | Input设备索引,用于标志多个Input设备,取值从0开始,最多支持32个设备。 | ### ReportHotPlugEventCallback @@ -56,7 +56,7 @@ void(* InputReportEventCb::ReportHotPlugEventCallback) (const HotPlugEvent *even **描述:** -热插拔事件上报的回调函数 +热插拔事件上报的回调函数。 **参数:** diff --git a/zh-cn/device-dev/reference/hdi-apis/_input_reporter.md b/zh-cn/device-dev/reference/hdi-apis/_input_reporter.md index fa80efaff1bddf7031df4d9ff943e911d6a38c5e..cb5424095a877c82857f3e693823bb85a1e50155 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_input_reporter.md +++ b/zh-cn/device-dev/reference/hdi-apis/_input_reporter.md @@ -15,17 +15,17 @@ | Public 属性 | 描述 | | -------- | -------- | -| ( [RegisterReportCallback](#registerreportcallback) )(uint32_t devIndex, [InputReportEventCb](_input_report_event_cb.md) \*callback) | 注册对应设备的回调函数 [更多...](#registerreportcallback) | -| ( [UnregisterReportCallback](#unregisterreportcallback) )(uint32_t devIndex) | 注销对应设备的回调函数 [更多...](#unregisterreportcallback) | -| ( [RegisterHotPlugCallback](#registerhotplugcallback) )([InputReportEventCb](_input_report_event_cb.md) \*callback) | 注册Input设备的热插拔回调函数 [更多...](#registerhotplugcallback) | -| ( [UnregisterHotPlugCallback](#unregisterhotplugcallback) )(void) | 注销Input设备的热插拔回调函数 [更多...](#unregisterhotplugcallback) | +| ( [RegisterReportCallback](#registerreportcallback) )(uint32_t devIndex, [InputHostCb](_input_report_event_cb.md) \*callback) | 注册对应设备的回调函数。 [更多...](#registerreportcallback) | +| ( [UnregisterReportCallback](#unregisterreportcallback) )(uint32_t devIndex) | 注销对应设备的回调函数。 [更多...](#unregisterreportcallback) | +| ( [RegisterHotPlugCallback](#registerhotplugcallback) )([InputHostCb](_input_report_event_cb.md) \*callback) | 注册Input设备的热插拔回调函数。 [更多...](#registerhotplugcallback) | +| ( [UnregisterHotPlugCallback](#unregisterhotplugcallback) )(void) | 注销Input设备的热插拔回调函数。 [更多...](#unregisterhotplugcallback) | ## **详细描述** -提供input设备数据上报相关的接口。 +提供Input设备数据上报相关的接口。 -此类接口包含input设备的数据上报回调函数的注册和注销。 +此类接口包含Input设备的数据上报回调函数的注册和注销。 ## **类成员变量说明** @@ -35,53 +35,53 @@ ``` -int32_t(* InputReporter::RegisterHotPlugCallback) (InputReportEventCb *callback) +int32_t(* InputReporter::RegisterHotPlugCallback) (InputHostCb *callback) ``` **描述:** -注册Input设备的热插拔回调函数 +注册Input设备的热插拔回调函数。 -input服务通过此接口注册回调函数到hdi中,所有Input设备由此函数进行热插拔事件上报 +Input服务通过此接口注册回调函数到hdi中,所有Input设备由此函数进行热插拔事件上报。 **参数:** | 名称 | 描述 | | -------- | -------- | -| callback | 回调函数的函数指针 | +| callback | 输入参数,回调函数的函数指针。 | **返回:** -Returns INPUT_SUCCESS 表示执行成功。 +INPUT_SUCCESS 表示执行成功。 -Returns 其他值表示执行失败,具体错误码查看**RetSatus**。 +其他值表示执行失败,具体错误码查看**RetSatus**。 ### RegisterReportCallback ``` -int32_t(* InputReporter::RegisterReportCallback) (uint32_t devIndex, InputReportEventCb *callback) +int32_t(* InputReporter::RegisterReportCallback) (uint32_t devIndex, InputEventCb *callback) ``` **描述:** -注册对应设备的回调函数 +注册对应设备的回调函数。 -input服务通过此接口注册数据回调函数到hdi中,hdi通过此回调函数上报input事件 +Input服务通过此接口注册数据回调函数到hdi中,hdi通过此回调函数上报Input事件。 **参数:** | 名称 | 描述 | | -------- | -------- | -| devIndex | Input设备索引,用于标志多个input设备,取值从0开始,最多支持32个设备 | -| callback | 回调函数的函数指针 | +| devIndex | 输入参数,Input设备索引,用于标志多个Input设备,取值从0开始,最多支持32个设备。 | +| callback | 输入参数,回调函数的函数指针。 | **返回:** -Returns INPUT_SUCCESS 表示执行成功。 +INPUT_SUCCESS 表示执行成功。 -Returns 其他值表示执行失败,具体错误码查看**RetSatus**。 +其他值表示执行失败,具体错误码查看**RetSatus**。 ### UnregisterHotPlugCallback @@ -93,19 +93,13 @@ int32_t(* InputReporter::UnregisterHotPlugCallback) (void) **描述:** -注销Input设备的热插拔回调函数 - -**参数:** - - | 名称 | 描述 | -| -------- | -------- | -| 无 | - | +注销Input设备的热插拔回调函数。 **返回:** -Returns INPUT_SUCCESS 表示执行成功。 +INPUT_SUCCESS 表示执行成功。 -Returns 其他值表示执行失败,具体错误码查看**RetSatus**。 +其他值表示执行失败,具体错误码查看**RetSatus**。 ### UnregisterReportCallback @@ -117,16 +111,16 @@ int32_t(* InputReporter::UnregisterReportCallback) (uint32_t devIndex) **描述:** -注销对应设备的回调函数 +注销对应设备的回调函数。 **参数:** | 名称 | 描述 | | -------- | -------- | -| devIndex | Input设备索引,用于标志多个input设备,取值从0开始,最多支持32个设备 | +| devIndex | 输入参数,Input设备索引,用于标志多个Input设备,取值从0开始,最多支持32个设备。| **返回:** -Returns INPUT_SUCCESS 表示执行成功。 +INPUT_SUCCESS 表示执行成功。 -Returns 其他值表示执行失败,具体错误码查看**RetSatus**。 +其他值表示执行失败,具体错误码查看**RetSatus**。 diff --git a/zh-cn/device-dev/reference/hdi-apis/input__controller_8h.md b/zh-cn/device-dev/reference/hdi-apis/input__controller_8h.md index db9bca32bef40659abc5f0ca874078c80f7714c7..f89f9a17d20e7b32832471a655cb880bdab0abbd 100644 --- a/zh-cn/device-dev/reference/hdi-apis/input__controller_8h.md +++ b/zh-cn/device-dev/reference/hdi-apis/input__controller_8h.md @@ -15,12 +15,12 @@ | 类 | 描述 | | -------- | -------- | -| [InputController](_input_controller.md) | 提供input设备业务控制相关的接口。 [更多...](_input_controller.md) | +| [InputController](_input_controller.md) | 提供Input设备业务控制相关的接口。 [更多...](_input_controller.md) | ## **详细描述** -描述input设备业务控制相关的接口声明。 +描述Input设备业务控制相关的接口声明。 **Since:** diff --git a/zh-cn/device-dev/reference/hdi-apis/input__manager_8h.md b/zh-cn/device-dev/reference/hdi-apis/input__manager_8h.md index 03a08b6be878d8692f3c69d5a898c95526aaab2b..245d9225041d3f59c2e7e344294361e0a36e066b 100644 --- a/zh-cn/device-dev/reference/hdi-apis/input__manager_8h.md +++ b/zh-cn/device-dev/reference/hdi-apis/input__manager_8h.md @@ -15,7 +15,7 @@ | 类 | 描述 | | -------- | -------- | -| [InputManager](_input_manager.md) | 提供input设备管理相关的接口。 [更多...](_input_manager.md) | +| [InputManager](_input_manager.md) | 提供Input设备管理相关的接口。 [更多...](_input_manager.md) | | [IInputInterface](_i_input_interface.md) | 定义用于提供输入设备驱动能力的接口。[更多...](_i_input_interface.md) | @@ -23,12 +23,13 @@ | 函数 | 描述 | | -------- | -------- | -| [GetInputInterface](_input.md#getinputinterface) ([IInputInterface](_i_input_interface.md) \*\*interface) | input服务通过调用此接口获取操作input设备的所有接口。 [更多...](_input.md#getinputinterface) | +| [GetInputInterface](_input.md#getinputinterface) ([IInputInterface](_i_input_interface.md) \*\*interface) | Input服务通过调用此接口获取操作Input设备的所有接口。 [更多...](_input.md#getinputinterface) | +| [ReleaseInputInterface](_input.md#releaseinputinterface) ([IInputInterface](_i_input_interface.md) \*\*inputInterface) | Input服务通过调用此接口释放操作Input设备的所有接口。 [更多...](_input.md#releaseinputinterface) | ## **详细描述** -描述input设备管理相关的接口声明。 +描述Input设备管理相关的接口声明。 **Since:** diff --git a/zh-cn/device-dev/reference/hdi-apis/input__reporter_8h.md b/zh-cn/device-dev/reference/hdi-apis/input__reporter_8h.md index 5982a674507c08b4fdfa257a29ed69677b15c603..f537d55f387293772c63fc1446483d6629dc4166 100644 --- a/zh-cn/device-dev/reference/hdi-apis/input__reporter_8h.md +++ b/zh-cn/device-dev/reference/hdi-apis/input__reporter_8h.md @@ -15,12 +15,12 @@ | 类 | 描述 | | -------- | -------- | -| [InputReporter](_input_reporter.md) | 提供input设备数据上报相关的接口。 [更多...](_input_reporter.md) | +| [InputReporter](_input_reporter.md) | 提供Input设备数据上报相关的接口。 [更多...](_input_reporter.md) | ## **详细描述** -描述input设备数据上报相关的接口声明。 +描述Input设备数据上报相关的接口声明。 **Since:** diff --git a/zh-cn/device-dev/reference/hdi-apis/input__type_8h.md b/zh-cn/device-dev/reference/hdi-apis/input__type_8h.md index 97b78edcd59358dc48f4011ef9190b23d5a994c0..312d1c97928f3d96d89e41f557c3b0673aa3c328 100644 --- a/zh-cn/device-dev/reference/hdi-apis/input__type_8h.md +++ b/zh-cn/device-dev/reference/hdi-apis/input__type_8h.md @@ -15,9 +15,9 @@ | 类 | 描述 | | -------- | -------- | -| [EventPackage](_event_package.md) | input事件数据包结构 [更多...](_event_package.md) | -| [InputReportEventCb](_input_report_event_cb.md) | 此结构体定义了输入事件回调函数并提供给input服务使用 [更多...](_input_report_event_cb.md) | -| [DeviceInfo](_device_info.md) | input设备基础设备信息 [更多...](_device_info.md) | +| [EventPackage](_event_package.md) | Input事件数据包结构 [更多...](_event_package.md) | +| [InputReportEventCb](_input_report_event_cb.md) | 此结构体定义了输入事件回调函数并提供给Input服务使用 [更多...](_input_report_event_cb.md) | +| [DeviceInfo](_device_info.md) | Input设备基础设备信息 [更多...](_device_info.md) | | [InputExtraCmd](_input_extra_cmd.md) | 扩展指令的数据结构 [更多...](_input_extra_cmd.md) | @@ -26,11 +26,16 @@ | 宏定义 | 描述 | | -------- | -------- | | **MAX_INPUT_DEV_NUM**   32 | Input设备最大数量。 | -| **MAX_NODE_PATH_LEN**   64 | 节点路径最大长度。 | +| **DEV_NAME_LEN**   64 | Input设备名称长度。 | | **CHIP_INFO_LEN**   10 | 芯片信息长度。 | | **CHIP_NAME_LEN**   10 | 芯片名称长度。 | | **VENDOR_NAME_LEN**   10 | 厂商名称长度。 | | **SELF_TEST_RESULT_LEN**   20 | 自测结果长度。 | +| **DEV_MANAGER_SERVICE_NAME**   "hdf_input_host" | Input设备节点服务名称。 | +| **DIV_ROUND_UP(nr, d)**  (((nr) + (d) - 1) / (d)) | 向上取整计算公式。| +| **BYTE_HAS_BITS**  8 | 一个字节所包含的比特数。 | +| **BITS_TO_UINT64(count)**  DIV_ROUND_UP(count, BYTE_HAS_BITS * sizeof(uint64_t)) | 比特与64位无符号整数的转换公式。 | +| **HDF_FF_CNT**  (0x7f + 1) | Input设备发送力反馈命令的数量最大值。| ### 枚举 @@ -38,14 +43,14 @@ | 枚举 | 描述 | | -------- | -------- | | [RetStatus](_input.md#retstatus) { INPUT_SUCCESS = 0, INPUT_FAILURE = -1, INPUT_INVALID_PARAM = -2, INPUT_NOMEM = -3,   INPUT_NULL_PTR = -4, INPUT_TIMEOUT = -5, INPUT_UNSUPPORTED = -6 } | 定义返回值类型 [更多...](_input.md#retstatus) | -| [InputDevType](_input.md#inputdevtype) { INDEV_TYPE_TOUCH, INDEV_TYPE_KEY, INDEV_TYPE_KEYBOARD, INDEV_TYPE_MOUSE,   INDEV_TYPE_BUTTON, INDEV_TYPE_CROWN, INDEV_TYPE_ENCODER, INDEV_TYPE_UNKNOWN } | 定义input设备类型 [更多...](_input.md#inputdevtype) | +| [InputDevType](_input.md#inputdevtype) { INDEV_TYPE_TOUCH, INDEV_TYPE_KEY, INDEV_TYPE_KEYBOARD, INDEV_TYPE_MOUSE,   INDEV_TYPE_BUTTON, INDEV_TYPE_CROWN, INDEV_TYPE_ENCODER, INDEV_TYPE_UNKNOWN } | 定义Input设备类型 [更多...](_input.md#inputdevtype) | | [PowerStatus](_input.md#powerstatus) { INPUT_RESUME, INPUT_SUSPEND, INPUT_LOW_POWER, INPUT_POWER_STATUS_UNKNOWN } | 定义电源状态 [更多...](_input.md#powerstatus) | | [CapacitanceTest](_input.md#capacitancetest) { BASE_TEST, FULL_TEST, MMI_TEST, RUNNING_TEST,   TEST_TYPE_UNKNOWN } | 定义容值测试类型 [更多...](_input.md#capacitancetest) | ## **详细描述** -input设备相关的类型定义,定义了input设备驱动接口所使用的结构体及枚举类型。 +Input设备相关的类型定义,定义了Input设备驱动接口所使用的结构体及枚举类型。 **Since:**