Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Info about synchronous operations
  • Loading branch information
felHR85 committed Feb 27, 2016
1 parent 103defd commit aa39fbb
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,15 @@ Close the device:
serial.close();
~~~

I recommend using UsbSerial as shown above but if you want to perform write and read operations in synchronous way it is possible using these methods:
~~~
public boolean syncOpen();
public int syncWrite(byte[] buffer, int timeout)
public int syncRead(byte[] buffer, int timeout)
public void syncClose();
~~~


In Android usb api, when a usb device has been close it must be reopened
~~~
UsbDevice device;
Expand Down

0 comments on commit aa39fbb

Please sign in to comment.