Example usage for android.hardware.usb UsbConstants USB_TYPE_RESERVED

List of usage examples for android.hardware.usb UsbConstants USB_TYPE_RESERVED

Introduction

In this page you can find the example usage for android.hardware.usb UsbConstants USB_TYPE_RESERVED.

Prototype

int USB_TYPE_RESERVED

To view the source code for android.hardware.usb UsbConstants USB_TYPE_RESERVED.

Click Source Link

Document

Reserved endpoint zero control request type (currently unused).

Usage

From source file:org.chromium.ChromeUsb.java

private static int controlRequestTypeFromName(String requestType) throws UsbError {
    requestType = requestType.toLowerCase();
    if ("standard".equals(requestType)) {
        return UsbConstants.USB_TYPE_STANDARD; /* 0x00 */
    } else if ("class".equals(requestType)) {
        return UsbConstants.USB_TYPE_CLASS; /* 0x20 */
    } else if ("vendor".equals(requestType)) {
        return UsbConstants.USB_TYPE_VENDOR; /* 0x40 */
    } else if ("reserved".equals(requestType)) {
        return UsbConstants.USB_TYPE_RESERVED; /* 0x60 */
    } else {//from  w w w . j  av a 2s. co m
        throw new UsbError("Unknown transfer requestType: " + requestType);
    }
}