Press on the image to return to the main documentation page.
felUsbSerial
List of types:
felUsbSerial
felUsbSerial
Events:
DataAvailable (Buffer() As Byte)
Members:
BaudRate
As
Int
[write
only]
BUFFER_READ_SIZE
As
Int
BUFFER_WRITE_SIZE
As
Int
Close
DATA_BITS_5
As
Int
DATA_BITS_6
As
Int
DATA_BITS_7
As
Int
DATA_BITS_8
As
Int
DataBits
As
Int
[write
only]
DebugMode
As
Boolean
[write
only]
FLOW_CONTROL_DSR_DTR
As
Int
FLOW_CONTROL_OFF
As
Int
FLOW_CONTROL_RTS_CTS
As
Int
FLOW_CONTROL_XON_XOFF
As
Int
FlowControl
As
Int
[write
only]
Initialize
(
EventName
As
String
,
Device
As
android
.
hardware
.
usb
.
UsbDevice
,
InterfaceIndex
As
Int
)
Initialize2
(
EventName
As
String
,
Device
As
android
.
hardware
.
usb
.
UsbDevice
,
InterfaceIndex
As
Int
,
ClassName
As
String
)
IsInitialized
As
Boolean
Parity
As
Int
[write
only]
PARITY_EVEN
As
Int
PARITY_MARK
As
Int
PARITY_NONE
As
Int
PARITY_ODD
As
Int
PARITY_SPACE
As
Int
StartReading
STOP_BITS_1
As
Int
STOP_BITS_15
As
Int
STOP_BITS_2
As
Int
StopBits
As
Int
[write
only]
Write
(
Data
()
As
Byte
)
Members description:
BaudRate
As
Int
[write
only]
BUFFER_READ_SIZE
As
Int
Internal read buffer size. Default value is 16 * 1024. Changes should be done before calling Initialize.
BUFFER_WRITE_SIZE
As
Int
Internal write buffer size. Default value is 16 * 1024. Changes should be done before calling Initialize.
Close
DATA_BITS_5
As
Int
DATA_BITS_6
As
Int
DATA_BITS_7
As
Int
DATA_BITS_8
As
Int
DataBits
As
Int
[write
only]
One of the DATA_BITS constants.
DebugMode
As
Boolean
[write
only]
Whether to print debug information (default is true).
FLOW_CONTROL_DSR_DTR
As
Int
FLOW_CONTROL_OFF
As
Int
FLOW_CONTROL_RTS_CTS
As
Int
FLOW_CONTROL_XON_XOFF
As
Int
FlowControl
As
Int
[write
only]
One of the FLOW_CONTROL constants.
Note that this method is only supported with CP2102 and FTDI chips.
Initialize
(
EventName
As
String
,
Device
As
android
.
hardware
.
usb
.
UsbDevice
,
InterfaceIndex
As
Int
)
Initializes and opens the usb device.
EventName - Sets the sub that will handle the DataAvailable event.
Device - The UsbDevice previously found with UsbManager.
InterfaceIndex - The interface index. Pass -1 to choose automatically.
Initialize2
(
EventName
As
String
,
Device
As
android
.
hardware
.
usb
.
UsbDevice
,
InterfaceIndex
As
Int
,
ClassName
As
String
)
Similar to Initialize. This method lets you explicitly choose the serial class.
ClassName - One of the following strings: "CDCSerialDevice", "CH34xSerialDevice", "CP2102SerialDevice",
"FTDISerialDevice", "PL2303SerialDevice".
IsInitialized
As
Boolean
Parity
As
Int
[write
only]
One of the PARITY constants.
PARITY_EVEN
As
Int
PARITY_MARK
As
Int
PARITY_NONE
As
Int
PARITY_ODD
As
Int
PARITY_SPACE
As
Int
StartReading
Starts listening for incoming data. The DataAvailable event will be raised whenever new data is available.
STOP_BITS_1
As
Int
STOP_BITS_15
As
Int
STOP_BITS_2
As
Int
StopBits
As
Int
[write
only]
One of the STOP_BITS constants.
Write
(
Data
()
As
Byte
)
Top