- return null if no packet received
git-svn-id: https://svn.code.sf.net/p/libusbjava/code/trunk@93 94ad28fe-ef68-46b1-9651-e7ae4fcf1c4c
This commit is contained in:
@@ -61,6 +61,9 @@ public class Uart0 {
|
||||
DataPacket packet;
|
||||
try {
|
||||
packet = Dispatch.readUART();
|
||||
if (packet == null) {
|
||||
return null;
|
||||
}
|
||||
return packet.data;
|
||||
} catch (Exception e) {
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user