public interface FTDI
Modifier and Type | Method and Description |
---|---|
void |
close(int fd)
Close the FTDi device indicated by the file descriptor
|
java.lang.String[] |
getDevicesList()
Retrieve a list of USB devices
|
int |
open(java.lang.String path,
int baudrate,
int flags)
Open the FTDi device at the specified path
|
int |
read(int fd,
byte[] data)
Read any available data from the FTDi device specified by the file descriptor, up to the
length of the provided byte array
|
void |
write(int fd,
byte[] data,
int length)
Write data to the FTDi device specified by the file descriptor.
|
java.lang.String[] getDevicesList()
int open(java.lang.String path, int baudrate, int flags)
path
- Linux-style path of the devicebaudrate
- baud rate to use on the FTDi deviceflags
- flags for device usage, as specified in FTDIFlag
void close(int fd)
fd
- file descriptor returned by open(String, int, int)
int read(int fd, byte[] data)
fd
- file descriptor to read fromdata
- byte array to put the data invoid write(int fd, byte[] data, int length)
fd
- file descriptor to write todata
- buffer containing the data to writelength
- number of bytes to write