kopia lustrzana https://github.com/felHR85/UsbSerial
Only notify to ListenThread if a messafe fron IN endpoint is received
rodzic
b40a51dd50
commit
d6c029c3ac
Plik binarny nie jest wyświetlany.
Plik binarny nie jest wyświetlany.
Plik binarny nie jest wyświetlany.
|
@ -78,16 +78,18 @@ public abstract class UsbSerialDevice implements UsbSerialInterface
|
|||
Log.i(CLASS_ID, "Received data length: " + String.valueOf(data.length));
|
||||
serialBuffer.clearReadBuffer();
|
||||
onReceivedData(data);
|
||||
|
||||
synchronized(objectMonitor)
|
||||
{
|
||||
objectMonitor.notify();
|
||||
}
|
||||
|
||||
}else // Write
|
||||
{
|
||||
int pos = serialBuffer.getWriteBuffer().position();
|
||||
Log.i(CLASS_ID, "Send data length: " + String.valueOf(pos + 1));
|
||||
serialBuffer.clearWriteBuffer();
|
||||
}
|
||||
synchronized(objectMonitor)
|
||||
{
|
||||
objectMonitor.notify();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue