1/*
2 * Copyright (c) 2024 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16 /**
17 * @addtogroup HdiUsb
18 * @
19 *
20 * @brief Provides unified APIs for usb services to access usb drivers.
21 *
22 * A usb service can obtain a usb driver object or agent and then call APIs provided by this object or agent to
23 * access different types of usb devices based on the usb IDs, thereby obtaining usb information,
24 * subscribing to or unsubscribing from usb data, enabling or disabling a usb,
25 * setting the usb data reporting mode, and setting usb options such as the accuracy and measurement range.
26 *
27 * @since 5.0
28 */
29
30/**
31 * @file UsbTypes.idl
32 *
33 * @brief Defines the data used by the usb module, including the usb information,
34 * and reported usb data.
35 *
36 * @since 5.0
37 * @version 1.0
38 */
39
40package ohos.hdi.usb.v1_1;
41
42import ohos.hdi.usb.v1_0.UsbTypes;
43
44/**
45 * @brief Defines the ControlTransfer Params, which is used by {@link IUsbInterface::ControlTransferReadwithLength}.
46 * @since 5.0
47 * @version 1.0
48 */
49struct UsbCtrlTransferParams {
50    /**
51     * request type
52     * @since 5.0
53     * @version 1.0
54     */
55    int requestType;
56    /**
57     * request cmd
58     * @since 5.0
59     * @version 1.0
60     */
61    int requestCmd;
62    /**
63     * value
64     * @since 5.0
65     * @version 1.0
66     */
67    int value;
68    /**
69     * index
70     * @since 5.0
71     * @version 1.0
72     */
73    int index;
74    /**
75     * length
76     * @since 5.0
77     * @version 1.0
78     */
79    int length;
80    /**
81     * timeout
82     * @since 5.0
83     * @version 1.0
84     */
85    int timeout;
86};
87