kopia lustrzana https://github.com/felHR85/UsbSerial
Minor issue
rodzic
ee262cebef
commit
ec7be9af0e
Plik binarny nie jest wyświetlany.
Plik binarny nie jest wyświetlany.
Plik binarny nie jest wyświetlany.
Plik binarny nie jest wyświetlany.
|
@ -38,6 +38,7 @@ public class BLED112SerialDevice extends UsbSerialDevice
|
|||
};
|
||||
|
||||
private static final int BLED112_DEFAULT_CONTROL_LINE = 0x0003;
|
||||
private static final int BLED112_DISCONNECT_CONTROL_LINE = 0x0002;
|
||||
|
||||
private UsbInterface mInterface;
|
||||
private UsbEndpoint inEndpoint;
|
||||
|
@ -109,6 +110,7 @@ public class BLED112SerialDevice extends UsbSerialDevice
|
|||
@Override
|
||||
public void close()
|
||||
{
|
||||
setControlCommand(BLED112_SET_CONTROL_LINE_STATE, BLED112_DISCONNECT_CONTROL_LINE , null);
|
||||
killWorkingThread();
|
||||
connection.close();
|
||||
}
|
||||
|
|
|
@ -77,7 +77,6 @@ public abstract class UsbSerialDevice implements UsbSerialInterface
|
|||
&& request.getEndpoint().getDirection() == UsbConstants.USB_DIR_IN)
|
||||
{
|
||||
byte[] data = serialBuffer.getDataReceived();
|
||||
Log.i(CLASS_ID, "Received data length: " + String.valueOf(data.length));
|
||||
serialBuffer.clearReadBuffer();
|
||||
onReceivedData(data);
|
||||
requestIN.queue(serialBuffer.getReadBuffer(), SerialBuffer.DEFAULT_READ_BUFFER_SIZE);
|
||||
|
|
Ładowanie…
Reference in New Issue