public class FTD3XX
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
FTD3XX.ChipConfiguration
Contains information of the configurable parameters for the D3XX device
|
static class |
FTD3XX.ConfigurationDescriptor
Contains information of the USB configuration descriptor for the D3XX device.
|
static class |
FTD3XX.Constants
Contains constants for the D3XX devices.
|
static class |
FTD3XX.DeviceDescriptor
Contains information of the USB device descriptor for the D3XX device.
|
static class |
FTD3XX.DeviceInfo
Contains information of the user-configured device used to differentiate among multiple connected D3XX devices
|
static interface |
FTD3XX.INotificationCallback
Interface for setting notification callback
|
static class |
FTD3XX.InterfaceDescriptor
Contains information of the USB interface descriptor for the D3XX device.
|
static class |
FTD3XX.PipeInformation
Contains information of the USB endpoint descriptor for the D3XX device.
|
static class |
FTD3XX.SetupPacket
Contains information used for the control transfer sent to the D3XX device
|
| Constructor and Description |
|---|
FTD3XX(android.content.Context context)
Instantiates a FTD3XX class
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
AbortPipe(int pipe)
Aborts all of the pending transfers for a pipe.
|
void |
ClearNotificationCallback()
Clears the notification callback set SetNotificationCallback.
|
boolean |
ClearStreamPipe(int pipe)
Clears streaming protocol transfer for specified pipes.
|
void |
Close()
Close the handle of the opened device.
|
boolean |
ControlTransfer(FTD3XX.SetupPacket setupPacket,
byte[] buffer)
Transmits control data over the default control endpoint.
|
boolean |
ControlTransfer(FTD3XX.SetupPacket setupPacket,
byte[] buffer,
int offset)
Transmits control data over the default control endpoint.
|
int |
CreateDeviceInfoList()
Builds a device information list and returns the number of D3XX devices connected to the system.
|
boolean |
EnableGPIO(int mask,
int dir)
Configures pin into GPIO mode and configure direction.
|
boolean |
FlushPipe(int pipe)
Discards any data that is cached in an IN pipe.
|
FTD3XX.ChipConfiguration |
GetChipConfiguration()
Get the configurable parameters of the device.
|
FTD3XX.ConfigurationDescriptor |
GetConfigurationDescriptor()
Get configuration descriptor.
|
FTD3XX.DeviceDescriptor |
GetDeviceDescriptor()
Get device descriptor.
|
FTD3XX.DeviceInfo |
GetDeviceInfo()
Get the DeviceInfo structure of the opened device.
|
java.util.ArrayList<FTD3XX.DeviceInfo> |
GetDeviceInfoList()
Returns a device information list of connected devices.
|
int |
GetFirmwareVersion()
Get firmware version.
|
FTD3XX.InterfaceDescriptor |
GetInterfaceDescriptor(int index)
Get interface descriptor.
|
long |
GetLibraryVersion()
Get the version number of this class library.
|
FTD3XX.PipeInformation |
GetPipeInformation(int interfaceIndex,
int pipeIndex)
Get pipe information.
|
int |
GetRawDescriptors(byte[] buffer)
Get raw descriptors
|
android.hardware.usb.UsbDevice |
GetUsbDevice()
Gets the UsbDevice object corresponding to the device opened.
|
boolean |
IsOpen()
Checks if a handle to a device is open.
|
boolean |
IsUsbDevice(android.hardware.usb.UsbDevice device)
Checks if the same device is currently opened.
|
boolean |
Open()
Open the first device detected by the system.
|
boolean |
OpenByDescription(java.lang.String productName)
Open the device with the specified product description from the list of connected devices returned by GetDeviceInfoList.
|
boolean |
OpenByIndex(int index)
Open the device located at index 0 of list of connected devices returned by GetDeviceInfoList.
|
boolean |
OpenByLocation(java.lang.String locationId)
Open the device with the specified location id from the list of connected devices returned by GetDeviceInfoList.
|
boolean |
OpenBySerialNumber(java.lang.String serialNumber)
Open the device with the specified serial number from the list of connected devices returned by GetDeviceInfoList.
|
int |
ReadGPIO()
Returns the status of the GPIOs.
|
int |
ReadPipe(int pipe,
byte[] buffer,
int length)
Read data from pipe using Android Host API bulkTransfer().
|
int |
ReadPipe(int pipe,
byte[] buffer,
int length,
int timeoutMS)
Read data from pipe using Android Host API bulkTransfer().
|
int |
ReadPipe(int pipe,
byte[] buffer,
int offset,
int length,
int timeoutMS)
Read data from pipe using Android Host API bulkTransfer().
|
boolean |
ResetDevice()
Resets the device.
|
boolean |
SetChipConfiguration(FTD3XX.ChipConfiguration cfg)
Set the configurable parameters of the device.
|
boolean |
SetGPIOPull(int mask,
int pull)
Set gpio pull.
|
boolean |
SetNotificationCallback(FTD3XX.INotificationCallback callback)
Sets a receive notification callback function which will be called.
|
boolean |
SetStreamPipe(int pipe,
int size)
Sets streaming protocol transfer for specified pipes.
|
boolean |
WriteGPIO(int mask,
int data)
Sets the status of the GPIOs.
|
int |
WritePipe(int pipe,
byte[] buffer,
int length)
Write data to pipe using Android Host API bulkTransfer().
|
int |
WritePipe(int pipe,
byte[] buffer,
int length,
int timeoutMS)
Write data to pipe using Android Host API bulkTransfer().
|
int |
WritePipe(int pipe,
byte[] buffer,
int offset,
int length,
int timeoutMS)
Write data to pipe using Android Host API bulkTransfer().
|