From 7c34d6dda82a37d6aad60ef92af6943b215f9d14 Mon Sep 17 00:00:00 2001 From: liangqi Date: Wed, 18 Dec 2024 15:29:58 +0800 Subject: [PATCH] add accessory hdi Signed-off-by: liangqi --- usb/v1_1/IUsbInterface.idl | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/usb/v1_1/IUsbInterface.idl b/usb/v1_1/IUsbInterface.idl index a046959b..18b06c98 100644 --- a/usb/v1_1/IUsbInterface.idl +++ b/usb/v1_1/IUsbInterface.idl @@ -121,4 +121,37 @@ interface IUsbInterface extends ohos.hdi.usb.v1_0.IUsbInterface{ * @version 1.0 */ ControlTransferReadwithLength([in] struct UsbDev dev, [in] struct UsbCtrlTransferParams ctrl, [out] unsigned char[] data); + + /* * + * @brief Get Accessory Info. + * + * @param accessoryInfo Indicates the accessory information. + * + * @return Returns 0 if the operation is successful; returns a non-0 value if the operation fails. + * @since 5.0 + * @version 1.0 + */ + GetAccessoryInfo([out] String[] accessoryInfo); + + /* * + * @brief Open the Accessory descriptor. + * + * @param fd accessory file descriptor. + * + * @return Returns 0 if the operation is successful; returns a non-0 value if the operation fails. + * @since 5.0 + * @version 1.0 + */ + OpenAccessory([out] FileDescriptor fd); + + /* * + * @brief Close the Accessory descriptor. + * + * @param fd accessory file descriptor. + * + * @return Returns 0 if the operation is successful; returns a non-0 value if the operation fails. + * @since 5.0 + * @version 1.0 + */ + CloseAccessory([in] FileDescriptor fd); } \ No newline at end of file -- Gitee