added support to retrieve the device serial number

pull/84/head
bens-unit01 2014-09-09 16:06:28 -04:00 zatwierdzone przez mike wakerly
rodzic dbdf95525e
commit 09c84a4a3c
2 zmienionych plików z 14 dodań i 0 usunięć

Wyświetl plik

@ -79,6 +79,15 @@ abstract class CommonUsbSerialPort implements UsbSerialPort {
public int getPortNumber() {
return mPortNumber;
}
/**
* Returns the device serial number
* @return serial number
*/
@Override
public String getSerial() {
return mConnection.getSerial();
}
/**
* Sets the size of the internal buffer used to exchange data with the USB

Wyświetl plik

@ -90,6 +90,11 @@ public interface UsbSerialPort {
* Port number within driver.
*/
public int getPortNumber();
/**
* The serial number of the underlying UsbDeviceConnection, or {@code null}.
*/
public String getSerial();
/**
* Opens and initializes the port. Upon success, caller must ensure that