OSDN Git Service

release-request-d6bf2db5-83c3-41cb-ba89-644c366c2525-for-git_oc-mr1-release-4070602...
[android-x86/hardware-interfaces.git] / usb / 1.1 / types.hal
1 /*
2  * Copyright (C) 2016 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 package android.hardware.usb@1.1;
18
19 import android.hardware.usb@1.0;
20
21 @export
22 enum PortMode_1_1 : PortMode {
23     /*
24      * Indicates that the port supports Audio Accessory mode.
25      */
26     AUDIO_ACCESSORY = 1 << 2,
27
28     /*
29      * Indicates that the port supports Debug Accessory mode.
30      */
31     DEBUG_ACCESSORY = 1 << 3,
32
33     NUM_MODES_1_1 = 1 << 4,
34 };
35
36 /*
37  * Used as the container to report data back to the caller.
38  * Represents the current connection status of a single USB port.
39  */
40 struct PortStatus_1_1 {
41     /*
42      * The supportedModes and the currentMode fields of the status
43      * object should be set to NONE.
44      */
45     PortStatus status;
46
47     /*
48      * Identifies the modes supported by the port.
49      * Refer to PortMode_1_1 for the significance of the individual bits.
50      */
51     bitfield<PortMode_1_1> supportedModes;
52
53     /*
54      * Indicates the current mode in which the port is operating.
55      */
56     PortMode_1_1 currentMode;
57 };