Java Code Examples for android.hardware.usb.UsbEndpoint#getEndpointNumber()

The following examples show how to use android.hardware.usb.UsbEndpoint#getEndpointNumber() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BTChipTransportAndroidHID.java    From green_android with GNU General Public License v3.0 5 votes vote down vote up
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];
}
 
Example 2
Source File: BTChipTransportAndroidHID.java    From GreenBits with GNU General Public License v3.0 5 votes vote down vote up
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];
}
 
Example 3
Source File: BTChipTransportAndroidHID.java    From WalletCordova with GNU Lesser General Public License v2.1 5 votes vote down vote up
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];
}