Update README.md

Added Factory method reference in docs
pull/4/head
Felipe Herranz 2014-06-07 14:06:02 +02:00
rodzic 12751ee894
commit ae6a329f31
1 zmienionych plików z 4 dodań i 0 usunięć

Wyświetl plik

@ -11,6 +11,8 @@ Devices Supported
[FTDI devices](http://www.ftdichip.com/FTProducts.htm) Default: 9600,8,1,None,flow off
[PL2303 devices](http://www.prolific.com.tw/US/ShowProduct.aspx?p_id=225&pcid=41) Default 9600,8,1,None,flow off
How to use it?
--------------------------------------
Instantiate a new object of the desired device you want to handle
@ -20,6 +22,8 @@ UsbDeviceConnection usbConnection;
...
CP2102SerialDevice cp2102 = new CP2102SerialDevice(device, usbConnection);
//UsbSerialDevice bled112 = new BLED112SerialDevice(device, usbConnection);
// Factory method, auto detect current device connected, return null if is not supported
// UsbSerialDevice serial = UsbSerialDevice.createUsbSerialDevice(device, usbConnection);
~~~
Open the device and set it up as desired