From ce70b8624746e95078948eed6793f48662e85b07 Mon Sep 17 00:00:00 2001 From: Anduin1109 Date: Thu, 26 Jun 2025 03:47:23 +0000 Subject: [PATCH 1/2] update usb/v2_0/IUsbHostInterface.idl. Signed-off-by: Anduin1109 --- usb/v2_0/IUsbHostInterface.idl | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/usb/v2_0/IUsbHostInterface.idl b/usb/v2_0/IUsbHostInterface.idl index 451e9c97..f0da15ac 100644 --- a/usb/v2_0/IUsbHostInterface.idl +++ b/usb/v2_0/IUsbHostInterface.idl @@ -153,6 +153,33 @@ interface IUsbHostInterface { */ ManageInterface([in] struct UsbDev dev, [in] unsigned char interfaceid, [in] boolean disable); + /* * + * @brief Manage the authorization of the USB device. + * + * @param devNum Indicates the bus number of the USB device. + * @param devAddr Indicates the USB device address. + * @param authorized Indicates whether to authorize the USB device. + * + * @return Returns 0 if the operation is successful; returns a non-0 value if the operation fails. + * @since 6.0 + * @version 1.0 + */ + UsbDeviceAuthorize([in] unsigned char devNum, [in] unsigned char devAddr, [in] boolean authorized); + + /* * + * @brief Manage the authorization of the interface of the USB device. + * + * @param dev Indicates the USB device. + * @param configId Indicates the config ID of the target interface. + * @param interfaceId Indicates the ID of the target interface. + * @param authorized Indicates whether to authorize the interface. + * + * @return Returns 0 if the operation is successful; returns a non-0 value if the operation fails. + * @since 6.0 + * @version 1.0 + */ + UsbInterfaceAuthorize([in] struct UsbDev dev, [in] unsigned char configId, [in] unsigned char interfaceId, [in] boolean authorized); + /* * * @brief Clear the halt status for an endpoint. * -- Gitee From 1b52da2c3de83fba4ef7327f1c0b2e1afe31d5e7 Mon Sep 17 00:00:00 2001 From: Anduin1109 Date: Mon, 30 Jun 2025 11:25:59 +0000 Subject: [PATCH 2/2] add new interface "UsbDeviceAuthorize", "UsbInterfaceAuthorize" Signed-off-by: Anduin1109 --- usb/v2_0/IUsbHostInterface.idl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usb/v2_0/IUsbHostInterface.idl b/usb/v2_0/IUsbHostInterface.idl index f0da15ac..14be5553 100644 --- a/usb/v2_0/IUsbHostInterface.idl +++ b/usb/v2_0/IUsbHostInterface.idl @@ -164,7 +164,7 @@ interface IUsbHostInterface { * @since 6.0 * @version 1.0 */ - UsbDeviceAuthorize([in] unsigned char devNum, [in] unsigned char devAddr, [in] boolean authorized); + UsbDeviceAuthorize([in] unsigned char busNum, [in] unsigned char devAddr, [in] boolean authorized); /* * * @brief Manage the authorization of the interface of the USB device. -- Gitee