android UsbConstants 属性

UsbConstants


USB_ENDPOINT_NUMBER_MASK
Bitmask used for extracting the UsbEndpoint number its address field.
位请求用于提取UsbEndpoint号码及其地址字段 Constant Value: 15 (0x0000000f)

USB_TYPE_CLASS
Used to specify that an endpoint zero control request is a class specific request.
用于指定端点零控制请求是类特定的请求 Constant Value: 32 (0x00000020)

USB_TYPE_MASK
Bitmask used for encoding the request type for a control request on endpoint zero.
位请求,用于对端点零上的控制请求的请求类型进行编码 Constant Value: 96 (0x00000060)

USB_TYPE_RESERVED
Reserved endpoint zero control request type (currently unused).
保留的端点零控制请求类型(当前未使用)Constant Value: 96 (0x00000060)

USB_TYPE_STANDARD
Used to specify that an endpoint zero control request is a standard request.
用于指定端点零控制请求是标准请求 Constant Value: 0 (0x00000000)

USB_TYPE_VENDOR
Used to specify that an endpoint zero control request is a vendor specific request.
用于指定端点零控制请求是供应商特定的请求 Constant Value: 64 (0x00000040)

UsbInterface.getInterfaceClass() == 对应UsbConstants 已下参数(个人猜测瞎想 不一定准确)

USB_CLASS_PER_INTERFACE
USB class indicating that the class is determined on a per-interface basis.
USB类,指示基于每个接口确定类。Constant Value: 0 (0x00000000)

USB_CLASS_AUDIO`
USB class for audio devices.
音频设备的USB类 Constant Value: 1 (0x00000001)

USB_CLASS_COMM`
USB class for communication devices.
通信设备的USB类 Constant Value: 2 (0x00000002)

USB_CLASS_HID`
USB class for human interface devices (for example, mice and keyboards).
用于人机接口设备(例如,鼠标和键盘)的USB类 Constant Value: 3 (0x00000003)

USB_CLASS_PHYSICA
USB class for physical devices.
物理设备的USB类。Constant Value: 5 (0x00000005)

USB_CLASS_STILL_IMAGE
USB class for still image devices (digital cameras).
用于静止图像设备(数码相机)的USB类。 Constant Value: 6 (0x00000006)

USB_CLASS_PRINTER`
USB class for printers.
打印机的USB类 Constant Value: 7 (0x00000007)

USB_CLASS_MASS_STORAGE
USB class for mass storage devices.
用于大容量存储设备的USB类。Constant Value: 8 (0x00000008)

USB_CLASS_HUB
USB class for USB hubs.
USB集线器的USB类 Constant Value: 9 (0x00000009)

USB_CLASS_CDC_DATA`
USB class for CDC devices (communications device class).
CDC设备的USB类(通信设备类)。Constant Value: 10 (0x0000000a)

USB_CLASS_CSCID`
USB class for content smart card devices.
内容智能卡设备的USB类 Constant Value: 11 (0x0000000b)

USB_CLASS_CONTENT_SEC
USB class for content security devices.
内容安全设备的USB类 Constant Value: 13 (0x0000000d)

USB_CLASS_VIDEO
USB class for video devices.
视频设备的USB类。Constant Value: 14 (0x0000000e)

USB_CLASS_WIRELESS_CONTROLLER
USB class for wireless controller devices.
无线控制器设备的USB类。 Constant Value: 224 (0x000000e0)

USB_CLASS_MISC
USB class for wireless miscellaneous devices
无线杂项设备的USB类 Constant Value: 239 (0x000000ef)

USB_CLASS_APP_SPEC
Application specific USB class.
应用程序特定的USB类 Constant Value: 254 (0x000000fe)

USB_CLASS_VENDOR_SPEC
Vendor specific USB class.
供应商特定的USB类 Constant Value: 255 (0x000000ff)

USB_INTERFACE_SUBCLASS_BOOT
Boot subclass for HID devices.
HID设备的引导子类。Constant Value: 1 (0x00000001)

USB_SUBCLASS_VENDOR_SPEC
Vendor specific USB subclass.
供应商特定的USB子类。Constant Value: 255 (0x000000ff)

UsbEndpoint.getType 对应的UsbConstants 有以下4个

USB_ENDPOINT_XFER_CONTROL
Control endpoint type (endpoint zero)
控制端点类型(端点零)Constant Value: 0 (0x00000000)

USB_ENDPOINT_XFER_ISOC
Isochronous endpoint type (currently not supported)
等时端点类型(当前不支持)Constant Value: 1 (0x00000001)

USB_ENDPOINT_XFER_BULK
Bulk endpoint type
批量端点类型 Constant Value: 2 (0x00000002)

USB_ENDPOINT_XFER_INT
Interrupt endpoint type
中断端点类型 Constant Value: 3 (0x00000003)

USB_ENDPOINT_XFERTYPE_MASK
Bitmask used for extracting the UsbEndpoint type from its address field.
用于从地址字段中提取UsbEndpoint类型的位请求 Constant Value: 3 (0x00000003)

UsbEndpoint.getDirection()对应的UsbConstants

USB_ENDPOINT_DIR_MASK
Bitmask used for extracting the UsbEndpoint direction from its address field
用于从地址字段中提取UsbEndpoint方向的位请求 Constant Value: 128 (0x00000080

USB_DIR_IN
Used to signify direction of data for a UsbEndpoint is IN (device to host)
用于表示UsbEndpoint的数据方向为IN(设备到主机)Constant Value: 128 (0x00000080)

USB_DIR_OUT
Used to signify direction of data for a UsbEndpoint is OUT (host to device)
用于表示UsbEndpoint的数据方向的是OUT(主机到设备)Constant Value: 0 (0x00000000

你可能感兴趣的:(android UsbConstants 属性)