Skip to content

Commit

Permalink
write and read functions perform asynchronously
Browse files Browse the repository at this point in the history
  • Loading branch information
felHR85 committed May 1, 2016
1 parent 94f7a93 commit 128dd8d
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public void writeMOSI(byte[] buffer)

System.arraycopy(buffer, 0, buffCommand, 8, buffer.length);

connection.bulkTransfer(outEndpoint, buffCommand, buffCommand.length, USB_TIMEOUT);
serialBuffer.putWriteBuffer(buffCommand);
}

@Override
Expand Down Expand Up @@ -136,7 +136,7 @@ public void readMISO(int lengthBuffer)
buffCommand[6] = (byte) ((lengthBuffer >> 16) & 0xff);
buffCommand[7] = (byte) ((lengthBuffer >> 24) & 0xff);

connection.bulkTransfer(outEndpoint, buffCommand, buffCommand.length, USB_TIMEOUT);
serialBuffer.putWriteBuffer(buffCommand);
}

@Override
Expand All @@ -154,7 +154,7 @@ public void writeRead(byte[] buffer, int lengthRead)

System.arraycopy(buffer, 0, buffCommand, 8, buffer.length);

connection.bulkTransfer(outEndpoint, buffCommand, buffCommand.length, USB_TIMEOUT);
serialBuffer.putWriteBuffer(buffCommand);
}

@Override
Expand Down

0 comments on commit 128dd8d

Please sign in to comment.