create method
Creates a UsbPort from the UsbDevice.
type
can be any of the UsbSerial.CDC, UsbSerial.CH34x, UsbSerial.CP210x, UsbSerial.FTDI or USBSerial.PL2303
values or empty for auto detection.
iface
is the USB interface to use or -1 to auto detect.
returns the new UsbPort or throws an error on open failure.
Implementation
Future<UsbPort> create([String type = "", int iface = -1]) {
return UsbSerial.createFromDeviceId(deviceId, type, iface);
}