Winsoft ComPort for Android FTDI 3.0 Full Source » Developer.Team - Developers Paradise!

Winsoft ComPort for Android FTDI 3.0 Full Source

Winsoft ComPort for Android FTDI 3.0 Full Source
Winsoft ComPort for Android FTDI 3.0 Full Source


Delphi and C++ Builder serial communication library for FTDI devices for Android.

uses FTDI D2XX library
no special root access privileges needed
available for Delphi/C++ Builder XE6 - 10.2
source code included in registered version
royalty free distribution in applications

API

JD2xxManagerClass = interface(JObjectClass)
{Methods}
function getInstance(parentContext: JContext): JD2xxManager;
function getLibraryVersion: Integer;
{Properties}
property FTDI_BREAK_OFF: Integer read;
property FTDI_BREAK_ON: Integer read;
property FT_BI: Byte read;
property FT_BITMODE_ASYNC_BITBANG: Byte read;
property FT_BITMODE_CBUS_BITBANG: Byte read;
property FT_BITMODE_FAST_SERIAL: Byte read;
property FT_BITMODE_MCU_HOST: Byte read;
property FT_BITMODE_MPSSE: Byte read;
property FT_BITMODE_RESET: Byte read;
property FT_BITMODE_SYNC_BITBANG: Byte read;
property FT_BITMODE_SYNC_FIFO: Byte read;
property FT_CTS: Byte read;
property FT_DATA_BITS_7: Byte read;
property FT_DATA_BITS_8: Byte read;
property FT_DCD: Byte read;
property FT_DEVICE_2232: Integer read;
property FT_DEVICE_2232H: Integer read;
property FT_DEVICE_232B: Integer read;
property FT_DEVICE_232H: Integer read;
property FT_DEVICE_232R: Integer read;
property FT_DEVICE_245R: Integer read;
property FT_DEVICE_4222_0: Integer read;
property FT_DEVICE_4222_1_2: Integer read;
property FT_DEVICE_4222_3: Integer read;
property FT_DEVICE_4232H: Integer read;
property FT_DEVICE_8U232AM: Integer read;
property FT_DEVICE_UNKNOWN: Integer read;
property FT_DEVICE_X_SERIES: Integer read;
property FT_DSR: Byte read;
property FT_EVENT_LINE_STATUS: Byte read;
property FT_EVENT_MODEM_STATUS: Byte read;
property FT_EVENT_REMOVED: Byte read;
property FT_EVENT_RXCHAR: Byte read;
property FT_FE: Byte read;
property FT_FLAGS_HI_SPEED: Byte read;
property FT_FLAGS_OPENED: Byte read;
property FT_FLOW_DTR_DSR: SmallInt read;
property FT_FLOW_NONE: SmallInt read;
property FT_FLOW_RTS_CTS: SmallInt read;
property FT_FLOW_XON_XOFF: SmallInt read;
property FT_OE: Byte read;
property FT_PARITY_EVEN: Byte read;
property FT_PARITY_MARK: Byte read;
property FT_PARITY_NONE: Byte read;
property FT_PARITY_ODD: Byte read;
property FT_PARITY_SPACE: Byte read;
property FT_PE: Byte read;
property FT_PURGE_RX: Byte read;
property FT_PURGE_TX: Byte read;
property FT_RI: Byte read;
property FT_STOP_BITS_1: Byte read;
property FT_STOP_BITS_2: Byte read;
end;


JD2xxManager = interface(JObject)
function addUsbDevice(dev: JUsbDevice): Integer;
function createDeviceInfoList(parentContext: JContext): Integer;
function getDeviceInfoList(numDevs: Integer; deviceList: TJavaObjectArray): Integer;
function getDeviceInfoListDetail(&index: Integer): JD2xxManager_FtDeviceInfoListNode;
function getVIDPID: TJavaArray;
function isFtDevice(dev: JUsbDevice): Boolean;
function openByDescription(parentContext: JContext; description: JString; params: JD2xxManager_DriverParameters): JFT_Device;
function openByDescription(parentContext: JContext; description: JString): JFT_Device;
function openByIndex(parentContext: JContext; &index: Integer; params: JD2xxManager_DriverParameters): JFT_Device;
function openByIndex(parentContext: JContext; &index: Integer): JFT_Device;
function openByLocation(parentContext: JContext; location: Integer; params: JD2xxManager_DriverParameters): JFT_Device;
function openByLocation(parentContext: JContext; location: Integer): JFT_Device;
function openBySerialNumber(parentContext: JContext; serialNumber: JString; params: JD2xxManager_DriverParameters): JFT_Device;
function openBySerialNumber(parentContext: JContext; serialNumber: JString): JFT_Device;
function openByUsbDevice(parentContext: JContext; dev: JUsbDevice; params: JD2xxManager_DriverParameters): JFT_Device;
function openByUsbDevice(parentContext: JContext; dev: JUsbDevice): JFT_Device;
function setVIDPID(vendorId: Integer; productId: Integer): Boolean;
end;


JFT_Device = interface(JObject)
procedure close;
function clrDtr: Boolean;
function clrRts: Boolean;
function eepromErase: Boolean;
function eepromGetUserAreaSize: Integer;
function eepromRead: JFT_EEPROM;
function eepromReadUserArea(length: Integer): TJavaArray;
function eepromReadWord(offset: SmallInt): Integer;
function eepromWrite(eedаta: JFT_EEPROM): SmallInt;
function eepromWriteUserArea(dаta: TJavaArray): Integer;
function eepromWriteWord(address: SmallInt; dаta: SmallInt): Boolean;
function getBitMode: Byte;
function getDeviceInfo: JD2xxManager_FtDeviceInfoListNode;
function getEventStatus: Int64;
function getLatencyTimer: Byte;
function getLineStatus: SmallInt;
function getModemStatus: SmallInt;
function getQueueStatus: Integer;
function getReadTimeout: Integer;
function isOpen: Boolean;
function purge(flags: Byte): Boolean;
function &read(dаta: TJavaArray; length: Integer): Integer;
function &read(dаta: TJavaArray): Integer;
function &read(dаta: TJavaArray; length: Integer; wait_ms: Int64): Integer;
function readBufferFull: Boolean;
function resetDevice: Boolean;
procedure restartInTask;
function setBaudRate(baudRate: Integer): Boolean;
function setBitMode(mask: Byte; bitMode: Byte): Boolean;
function setBreakOff: Boolean;
function setBreakOn: Boolean;
function setChars(eventChar: Byte; eventCharEnable: Byte; errorChar: Byte; errorCharEnable: Byte): Boolean;
function setDataCharacteristics(dataBits: Byte; stopBits: Byte; parity: Byte): Boolean;
function setDtr: Boolean;
function setEventNotification(Mask: Int64): Boolean;
function setFlowControl(flowControl: SmallInt; xon: Byte; xoff: Byte): Boolean;
function setLatencyTimer(latency: Byte): Boolean;
function setRts: Boolean;
procedure stopInTask;
function stoppedInTask: Boolean;
function VendorCmdGet(request: Integer; wValue: Integer; buf: TJavaArray; datalen: Integer): Integer;
function VendorCmdSet(request: Integer; wValue: Integer; buf: TJavaArray; datalen: Integer): Integer;
function VendorCmdSet(request: Integer; wValue: Integer): Integer;
function &write(dаta: TJavaArray): Integer;
function &write(dаta: TJavaArray; length: Integer): Integer;
function &write(dаta: TJavaArray; length: Integer; wait: Boolean): Integer;
end;


JFT_EEPROM = interface(JObject)
property DeviceType: SmallInt read write;
property Manufacturer: JString read write;
property MaxPower: SmallInt read write;
property Product: JString read write;
property ProductId: SmallInt read write;
property PullDownEnable: Boolean read write;
property RemoteWakeup: Boolean read write;
property SelfPowered: Boolean read write;
property SerialNumber: JString read write;
property SerNumEnable: Boolean read write;
property VendorId: SmallInt read write;
end;




Only for V.I.P
Warning! You are not allowed to view this text.