Download Winsoft ComPort for Android USB Serial 3.3 for Delphi/C++ Builder XE6 - 10.4 Full Source

Winsoft ComPort for Android USB Serial 3.3 for Delphi/C++ Builder XE6 - 10.4 Full Source

Winsoft ComPort for Android USB Serial 3.3 for Delphi/C++ Builder XE6 - 10.4 Full Source
Winsoft ComPort for Android USB Serial 3.3 for Delphi/C++ Builder XE6 - 10.4 Full Source


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

FEATURES

Uses UsbSerial library
Supports CP210x, CP2130, CDC, FTDI, PL2303 and CH34x devices
No special root access privileges needed
Available for Delphi/C++ Builder XE6 - 10.4
Source code included in registered version
Royalty free distribution in applications

type
TDataBits = (db5, db6, db7, db8);
TStopBits = (sb1, sb15, sb2);
TParity = (paNone, paOdd, paEven, paMark, paSpace);
TFlowControl = (fcOff, fcRtsCts, fcDsrDtr, fcXonXoff);

TOnBreakInterrupt = procedure of object;
TOnCtsChanged = procedure(State: Boolean) of object;
TOnDeviceAttached = procedure(Device: JUsbDevice) of object;
TOnDeviceDetached = procedure(Device: JUsbDevice) of object;
TOnDsrChanged = procedure(State: Boolean) of object;
TOnFramingError = procedure of object;
TOnOverrunError = procedure of object;
TOnParityError = procedure of object;
TOnPermission = procedure(Device: JUsbDevice; Granted: Boolean) of object;
TOnReceivedData = procedure(dаta: TJavaArray) of object;

EUsbSerialError = class(Exception);

TUsbSerial = class
constructor Create;

function IsSupported(UsbDevice: JUsbDevice): Boolean;
function HasPermission(UsbDevice: JUsbDevice): Boolean;
procedure RequestPermission(UsbDevice: JUsbDevice);

procedure Connect(UsbDevice: JUsbDevice);
procedure Disconnect;

procedure Open(Synchronous: Boolean = False);
procedure Close;

function Read(Buffer: TJavaArray; Timeout: Integer = 0): Integer;
function Read(Buffer: TArray; Timeout: Integer = 0): Integer;
function Read(var dаta: Byte; Timeout: Integer = 0): Integer;

function Write(Buffer: TJavaArray; Timeout: Integer = 0): Integer;
function Write(Buffer: TArray; Timeout: Integer = 0): Integer;
function Write(dаta: Byte; Timeout: Integer = 0): Integer;

procedure ClearBreak;
procedure SetBreak;

procedure ClearDtr;
procedure SetDtr;

procedure ClearRts;
procedure SetRts;

property BaudRate: Integer read write;
property Connected: Boolean read;
property DataBits: TDataBits read write;
property FlowControl: TFlowControl read write;
property Opened: Boolean read;
property Parity: TParity read write;
property StopBits: TStopBits read write;
property Synchronous: Boolean read;
property UsbDevice: JUsbDevice read;
property UsbDeviceConnection: JUsbDeviceConnection read;
property UsbDevices: TArray read;
property UsbManager: JUsbManager read;
property UsbSerialInterface: JUsbSerialInterface read;

property OnBreakInterrupt: TOnBreakInterrupt read write;
property OnCtsChanged: TOnCtsChanged read write;
property OnDeviceAttached: TOnDeviceAttached read write;
property OnDeviceDetached: TOnDeviceDetached read write;
property OnDsrChanged: TOnDsrChanged read write;
property OnFramingError: TOnFramingError read write;
property OnOverrunError: TOnOverrunError read write;
property OnParityError: TOnParityError read write;
property OnPermission: TOnPermission read write;
property OnReceiveddаta: TOnReceivedData read write;
end;

function ToByteArray(JavaArray: TJavaArray): TArray;


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