From aa39fbb17e068b05f9dcee3c8369aa9804e022f8 Mon Sep 17 00:00:00 2001 From: Felipe Herranz Date: Sat, 27 Feb 2016 19:40:34 +0100 Subject: [PATCH] Update README.md Info about synchronous operations --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 040fc6ea..95ad7a24 100644 --- a/README.md +++ b/README.md @@ -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;