Winsoft ComPort for Android USB v4.6 Full Source for Delphi/C++ Builder 10 - 11
Winsoft ComPort for Android USB v4.6 Full Source for Delphi/C++ Builder 10 - 11
Delphi and C++ Builder serial communication library for USB connected devices for Android.
Features
Uses usb-serial-for-android library
Supports FTDI FT232R, FT232H, FT2232H, FT4232H, FT230X, FT231X, FT234XD; Prolific PL2303;
Silabs CP2102 and all other CP210x; Qinheng CH340, CH341A; CDC/ACM (Arduino Uno) chips
No special root access privileges needed
Available for Delphi/C++ Builder 10 - 11
Source code included in registered version
Royalty free distribution in applications
type
TDataBits = (db5, db6, db7, db8);
TParity = (paNone, paOdd, paEven, paMark, paSpace);
TStopBits = (sb1, sb15, sb2);
TOnDeviceAttached = procedure(Device: JUsbDevice) of object;
TOnDeviceDetached = procedure(Device: JUsbDevice) of object;
TOnError = procedure(Exception: JException) of object;
TOnPermission = procedure(Device: JUsbDevice; Granted: Boolean) of object;
TOnReceivedData = procedure(Data: TArray<Byte>) of object;
EUsbSerialError = class(Exception);
TUsbSerial = class
constructor Create;
function GetDevice(Driver: JUsbSerialDriver): JUsbDevice;
function GetDevice(Port: JUsbSerialPort): JUsbDevice;
function HasPermission(UsbDevice: JUsbDevice): Boolean;
procedure RequestPermission(UsbDevice: JUsbDevice);
procedure Connect(Port: JUsbSerialPort);
procedure Disconnect;
procedure Open;
procedure Close;
function Read(Buffer: TJavaArray<Byte>; Timeout: Integer = 0): Integer;
function Read(Buffer: TArray<Byte>; Timeout: Integer = 0): Integer;
function Read(var Data: Byte; Timeout: Integer = 0): Integer;
function Write(Buffer: TJavaArray<Byte>; Timeout: Integer = 0): Integer;
function Write(Buffer: TArray<Byte>; Timeout: Integer = 0): Integer;
function Write(Data: Byte; Timeout: Integer = 0): Integer;
procedure WriteAsync(Buffer: TJavaArray<Byte>);
procedure WriteAsync(Buffer: TArray<Byte>);
procedure WriteAsync(Data: Byte);
procedure Purge;
procedure PurgeInput;
procedure PurgeOutput;
procedure ClearBreak;
procedure SetBreak;
property BaudRate: Integer read write;
property CD: Boolean read;
property Connected: Boolean read;
property CTS: Boolean read;
property DataBits: TDataBits read write;
property DSR: Boolean read;
property DTR: Boolean read write;
property Opened: Boolean read;
property Parity: TParity read write;
property RI: Boolean read;
property RTS: Boolean read write;
property StopBits: TStopBits read write;
property UsbDevice: JUsbDevice read;
property UsbDeviceConnection: JUsbDeviceConnection read;
property UsbSerialDrivers: TArray<JUsbSerialDriver> read;
property UsbSerialPorts[const Driver: JUsbSerialDriver]: TArray<JUsbSerialPort> read;
property UsbSerialPort: JUsbSerialPort read;
property UsbManager: JUsbManager read;
property OnDeviceAttached: TOnDeviceAttached read write;
property OnDeviceDetached: TOnDeviceDetached read write;
property OnError: TOnError read write;
property OnPermission: TOnPermission read write;
property OnReceivedData: TOnReceivedData read write;
end;
function ToByteArray(JavaArray: TJavaArray<Byte>): TArray<Byte>;
What's new
Version 4.6
added Delphi/C++ Builder 11 files
Version 4.6
added Delphi/C++ Builder 11 files
Only for V.I.P
Warning! You are not allowed to view this text.