下面列出了android.hardware.usb.UsbEndpoint#getEndpointNumber ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
public BTChipTransportAndroidHID(UsbDeviceConnection connection, UsbInterface dongleInterface, UsbEndpoint in, UsbEndpoint out, int timeout, boolean ledger) {
this.connection = connection;
this.dongleInterface = dongleInterface;
this.in = in;
this.out = out;
this.ledger = ledger;
// Compatibility with old prototypes, to be removed
if (!this.ledger) {
this.ledger = (in.getEndpointNumber() != out.getEndpointNumber());
}
this.timeout = timeout;
transferBuffer = new byte[HID_BUFFER_SIZE];
}
public BTChipTransportAndroidHID(UsbDeviceConnection connection, UsbInterface dongleInterface, UsbEndpoint in, UsbEndpoint out, int timeout, boolean ledger) {
this.connection = connection;
this.dongleInterface = dongleInterface;
this.in = in;
this.out = out;
this.ledger = ledger;
// Compatibility with old prototypes, to be removed
if (!this.ledger) {
this.ledger = (in.getEndpointNumber() != out.getEndpointNumber());
}
this.timeout = timeout;
transferBuffer = new byte[HID_BUFFER_SIZE];
}
public BTChipTransportAndroidHID(UsbDeviceConnection connection, UsbInterface dongleInterface, UsbEndpoint in, UsbEndpoint out, int timeout, boolean ledger) {
this.connection = connection;
this.dongleInterface = dongleInterface;
this.in = in;
this.out = out;
this.ledger = ledger;
// Compatibility with old prototypes, to be removed
if (!this.ledger) {
this.ledger = (in.getEndpointNumber() != out.getEndpointNumber());
}
this.timeout = timeout;
transferBuffer = new byte[HID_BUFFER_SIZE];
}