fixed wrong types names

This commit is contained in:
oscarl-2
2003-10-30 00:23:04 +00:00
parent 058df97436
commit 64c7cbe6d5
2 changed files with 144 additions and 151 deletions

View File

@@ -1,5 +1,5 @@
{ BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Eric Jourde
Copyright (C) 2002-2003 Eric Jourde
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -15,36 +15,40 @@
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
}
unit joystick;
unit Joystick;
interface
uses
beobj, SupportDefs, os;
BeObj, OS, SupportDefs;
type
BJoystick = class(TBeObject)
private
public
constructor Create; override;
destructor Destroy; override;
function Open(portName : PChar) : Status_t;
procedure Close;
function Open_1(portName : PChar; enter_enhanced : boolean):Status_t;
function Update: Status_t;
function SetMaxLatency( max_latency:TBigtime_t): Status_t;
function Open(portName : PChar) : status_t;
function Open_1(portName : PChar; enter_enhanced : boolean) : status_t;
procedure Close;
function Update : status_t;
function SetMaxLatency(max_latency : bigtime_t) : status_t;
function CountDevices : Cardinal;
function GetDeviceName( n : Integer; name : PChar; bufSize: Tsize_t): Status_t;
function GetDeviceName(n : Integer; name : PChar; bufSize : size_t) : status_t;
function CountSticks : Cardinal;
function CountAxes : Cardinal;
function CountHats : Cardinal;
function CountButtons : Cardinal;
function GetAxisValues( out_values : Integer; for_stick : cardinal): Status_t;
function ButtonValues(for_stick: cardinal):Cardinal;
function GetAxisValues(out_values : Integer; for_stick : Cardinal): status_t;
function ButtonValues(for_stick : Cardinal) : Cardinal;
function IsCalibrationEnabled : boolean;
function EnableCalibration (calibrates : boolean): Status_t;
function EnableCalibration(calibrates : boolean) : status_t;
// function BJoystick_EnterEnhancedMode(BAObject : TCPlusObject; const entry_ref *ref): Boolean;
// function GetAxisNameAt(index: cardinal; BString *out_name): Status_t;
@@ -53,44 +57,39 @@ type
// function GetControllerModule( BString *out_name): Status_t;
// function GetControllerName( BString *out_name): Status_t;
// function GetHatValues( uint8 *out_hats;for_stick: cardinal): Status_t;
end;
function BJoystick_Create(AObject : TBeObject) : TCPlusObject; cdecl; external BePascalLibName name 'BJoystick_Create';
procedure BJoystick_Free(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BJoystick_Free';
function BJoystick_Open(AObject : TCPlusObject; portName : PChar):Status_t ; cdecl; external BePascalLibName name 'BJoystick_Open';
function BJoystick_Open_1(AObject : TCPlusObject; portName : PChar; enter_enhanced : boolean):Status_t; cdecl; external BePascalLibName name 'BJoystick_Open_1';
function BJoystick_Open(AObject : TCPlusObject; portName : PChar) : status_t ; cdecl; external BePascalLibName name 'BJoystick_Open';
function BJoystick_Open_1(AObject : TCPlusObject; portName : PChar; enter_enhanced : boolean) : status_t; cdecl; external BePascalLibName name 'BJoystick_Open_1';
procedure BJoystick_Close(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BJoystick_Close';
function BJoystick_Update(AObject : TCPlusObject): Status_t; cdecl; external BePascalLibName name 'BJoystick_Update';
function BJoystick_SetMaxLatency(AObject : TCPlusObject; max_latency:TBigtime_t): Status_t; cdecl; external BePascalLibName name 'BJoystick_SetMaxLatency';
function BJoystick_Update(AObject : TCPlusObject) : status_t; cdecl; external BePascalLibName name 'BJoystick_Update';
function BJoystick_SetMaxLatency(AObject : TCPlusObject; max_latency : bigtime_t) : status_t; cdecl; external BePascalLibName name 'BJoystick_SetMaxLatency';
function BJoystick_CountDevices(AObject : TCPlusObject) : Cardinal; cdecl; external BePascalLibName name 'BJoystick_CountDevices';
function BJoystick_GetDeviceName(AObject : TCPlusObject; n : Integer; name : PChar; bufSize: Tsize_t): Status_t; cdecl; external BePascalLibName name 'BJoystick_GetDeviceName';
function BJoystick_GetDeviceName(AObject : TCPlusObject; n : Integer; name : PChar; bufSize : size_t) : status_t; cdecl; external BePascalLibName name 'BJoystick_GetDeviceName';
function BJoystick_CountSticks(BAObject : TCPlusObject): Cardinal; cdecl; external BePascalLibName name 'BJoystick_CountSticks';
function BJoystick_CountAxes(BAObject : TCPlusObject) : Cardinal; cdecl; external BePascalLibName name 'BJoystick_CountAxes';
function BJoystick_CountHats(BAObject : TCPlusObject) : Cardinal; cdecl; external BePascalLibName name 'BJoystick_CountHats';
function BJoystick_CountButtons(BAObject : TCPlusObject) : Cardinal; cdecl; external BePascalLibName name 'BJoystick_CountButtons';
function BJoystick_GetAxisValues(BAObject : TCPlusObject; out_values : Integer; for_stick : cardinal): Status_t; cdecl; external BePascalLibName name 'BJoystick_GetAxisValues';
function BJoystick_ButtonValues(BAObject : TCPlusObject;for_stick: cardinal):Cardinal; cdecl; external BePascalLibName name 'BJoystick_ButtonValues';
function BJoystick_IsCalibrationEnabled(BAObject : TCPlusObject):boolean; cdecl; external BePascalLibName name 'BJoystick_IsCalibrationEnabled';
function BJoystick_EnableCalibration(BAObject : TCPlusObject;calibrates : boolean): Status_t; cdecl; external BePascalLibName name 'BJoystick_EnableCalibration';
function BJoystick_GetAxisValues(BAObject : TCPlusObject; out_values : Integer; for_stick : Cardinal): Status_t; cdecl; external BePascalLibName name 'BJoystick_GetAxisValues';
function BJoystick_ButtonValues(BAObject : TCPlusObject;for_stick : Cardinal) : Cardinal; cdecl; external BePascalLibName name 'BJoystick_ButtonValues';
function BJoystick_IsCalibrationEnabled(BAObject : TCPlusObject) : Boolean; cdecl; external BePascalLibName name 'BJoystick_IsCalibrationEnabled';
function BJoystick_EnableCalibration(BAObject : TCPlusObject; calibrates : Boolean): Status_t; cdecl; external BePascalLibName name 'BJoystick_EnableCalibration';
//function BJoystick_EnterEnhancedMode(BAObject : TCPlusObject; const entry_ref *ref) : Boolean; cdecl; external BePascalLibName name 'BJoystick_EnterEnhancedMode';
//function BJoystick_GetHatValues(BAObject : TCPlusObject, uint8 *out_hats;for_stick: cardinal): Status_t; cdecl; external BePascalLibName name 'BJoystick_GetHatValues';
//function BJoystick_GetAxisNameAt(BAObject : TCPlusObject;index: cardinal; BString *out_name): Status_t; cdecl; external BePascalLibName name 'BJoystick_GetAxisNameAt';
//function BJoystick_GetHatNameAt(BAObject : TCPlusObject; index: cardinal, BString *out_name): Status_t; cdecl; external BePascalLibName name 'BJoystick_GetHatNameAt';
//function BJoystick_GetButtonNameAt(BAObject : TCPlusObject; index: cardinal,BString *out_name): Status_t; cdecl; external BePascalLibName name 'BJoystick_GetButtonNameAt';
//function BJoystick_GetControllerModule(BAObject : TCPlusObject, BString *out_name): Status_t; cdecl; external BePascalLibName name 'BJoystick_GetControllerModule';
//function BJoystick_GetControllerName(BAObject : TCPlusObject, BString *out_name): Status_t; cdecl; external BePascalLibName name 'BJoystick_GetControllerName';
//function BJoystick_GetHatValues(BAObject : TCPlusObject, uint8 *out_hats;for_stick: cardinal) : status_t; cdecl; external BePascalLibName name 'BJoystick_GetHatValues';
//function BJoystick_GetAxisNameAt(BAObject : TCPlusObject;index: cardinal; BString *out_name) : status_t; cdecl; external BePascalLibName name 'BJoystick_GetAxisNameAt';
//function BJoystick_GetHatNameAt(BAObject : TCPlusObject; index: cardinal, BString *out_name) : status_t; cdecl; external BePascalLibName name 'BJoystick_GetHatNameAt';
//function BJoystick_GetButtonNameAt(BAObject : TCPlusObject; index: cardinal,BString *out_name) : status_t; cdecl; external BePascalLibName name 'BJoystick_GetButtonNameAt';
//function BJoystick_GetControllerModule(BAObject : TCPlusObject, BString *out_name) : status_t; cdecl; external BePascalLibName name 'BJoystick_GetControllerModule';
//function BJoystick_GetControllerName(BAObject : TCPlusObject, BString *out_name) : status_t; cdecl; external BePascalLibName name 'BJoystick_GetControllerName';
implementation
constructor BJoystick.Create;
begin
inherited;
@@ -104,117 +103,111 @@ begin
inherited;
end;
function BJoystick.Open(portName : PChar) : Status_t;
function BJoystick.Open(portName : PChar) : status_t;
begin
result := BJoystick_Open(CPlusObject, portName);
Result := BJoystick_Open(CPlusObject, portName);
end;
function BJoystick.Open_1( portName : PChar; enter_enhanced : boolean):Status_t;
function BJoystick.Open_1(portName : PChar; enter_enhanced : boolean) : status_t;
begin
result := BJoystick_Open_1(CPlusObject, portName , enter_enhanced);
Result := BJoystick_Open_1(CPlusObject, portName, enter_enhanced);
end;
procedure BJoystick.Close;
begin
BJoystick_Close(CPlusObject);
end;
function BJoystick.Update: Status_t;
function BJoystick.Update : status_t;
begin
result:=BJoystick_Update(CPlusObject);
Result := BJoystick_Update(CPlusObject);
end;
function BJoystick.SetMaxLatency(max_latency:TBigtime_t): Status_t;
function BJoystick.SetMaxLatency(max_latency : bigtime_t) : status_t;
begin
result:=BJoystick_SetMaxLatency(CPlusObject, max_latency);
Result := BJoystick_SetMaxLatency(CPlusObject, max_latency);
end;
function BJoystick.CountDevices :Cardinal;
begin
result:=BJoystick_CountDevices(CPlusObject);
Result := BJoystick_CountDevices(CPlusObject);
end;
function BJoystick.GetDeviceName( n : Integer; name : PChar; bufSize: Tsize_t): Status_t;
function BJoystick.GetDeviceName(n : Integer; name : PChar; bufSize : size_t) : status_t;
begin
result:=BJoystick_GetDeviceName(CPlusObject, n, name, bufSize );
Result := BJoystick_GetDeviceName(CPlusObject, n, name, bufSize);
end;
//function BJoystick_EnterEnhancedMode(BAObject : TCPlusObject; const entry_ref *ref): Boolean;
function BJoystick.CountSticks : Cardinal;
begin
result:=BJoystick_CountSticks(CPlusObject);
Result := BJoystick_CountSticks(CPlusObject);
end;
function BJoystick.CountAxes : Cardinal;
begin
result:=BJoystick_CountAxes(CPlusObject);
Result := BJoystick_CountAxes(CPlusObject);
end;
function BJoystick.CountHats : Cardinal;
begin
result:=BJoystick_CountHats(CPlusObject);
Result := BJoystick_CountHats(CPlusObject);
end;
function BJoystick.CountButtons : Cardinal;
begin
result:=BJoystick_CountButtons(CPlusObject);
Result := BJoystick_CountButtons(CPlusObject);
end;
function BJoystick.GetAxisValues( out_values : Integer; for_stick : cardinal): Status_t;
function BJoystick.GetAxisValues(out_values : Integer; for_stick : Cardinal) : status_t;
begin
result:=BJoystick_GetAxisValues(CPlusObject, out_values, for_stick);
Result := BJoystick_GetAxisValues(CPlusObject, out_values, for_stick);
end;
//function BJoystick.GetHatValues( uint8 *out_hats ; for_stick: cardinal): Status_t;
//function BJoystick.GetHatValues(uint8 *out_hats ; for_stick : cardinal) : status_t;
//begin
// result:=BJoystick_GetHatValues( out_hats,for_stick);
// Result := BJoystick_GetHatValues(out_hats, for_stick);
//end;
function BJoystick.ButtonValues(for_stick : cardinal) : Cardinal;
begin
result:=BJoystick_ButtonValues(CPlusObject,for_stick);
Result := BJoystick_ButtonValues(CPlusObject, for_stick);
end;
//function BJoystick.GetAxisNameAt(index: cardinal; BString *out_name): Status_t;
//function BJoystick.GetAxisNameAt(index : cardinal; BString *out_name) : status_t;
//begin
// result:=BJoystick_GetAxisNameAt(CPlusObject,index,out_name);
// Result := BJoystick_GetAxisNameAt(CPlusObject, index, out_name);
//end;
//function BJoystick.GetHatNameAt( index: cardinal,BString *out_name): Status_t;
//function BJoystick.GetHatNameAt(index : cardinal,BString *out_name) : status_t;
//begin
// result:=BJoystick_GetHatNameAt(CPlusObject, index,out_name);
// Result := BJoystick_GetHatNameAt(CPlusObject, index,out_name);
//end;
//function BJoystick.GetButtonNameAt( index: cardinal,BString *out_name): Status_t;
//function BJoystick.GetButtonNameAt(index : cardinal, BString *out_name) : status_t;
//begin
// result:=BJoystick_GetButtonNameAt(CPlusObject, index,out_name);
// Result := BJoystick_GetButtonNameAt(CPlusObject, index, out_name);
//end;
//function BJoystick.GetControllerModule( BString *out_name): Status_t;
//function BJoystick.GetControllerModule(BString *out_name) : status_t;
//begin
// result:=BJoystick_GetControllerModule(CPlusObject, out_name);
// Result := BJoystick_GetControllerModule(CPlusObject, out_name);
//end;
//function BJoystick.GetControllerName( BString: *out_name): Status_t;
//function BJoystick.GetControllerName(BString : *out_name) : status_t;
//begin
// result:=BJoystick_GetControllerName(CPlusObject, out_name);
// Result := BJoystick_GetControllerName(CPlusObject, out_name);
//end;
function BJoystick.IsCalibrationEnabled:boolean;
function BJoystick.IsCalibrationEnabled : Boolean;
begin
result:=BJoystick_IsCalibrationEnabled(CPlusObject);
Result := BJoystick_IsCalibrationEnabled(CPlusObject);
end;
function BJoystick.EnableCalibration( calibrates : boolean): Status_t;
function BJoystick.EnableCalibration(calibrates : boolean) : status_t;
begin
result:=BJoystick_EnableCalibration(CPlusObject, calibrates);
Result := BJoystick_EnableCalibration(CPlusObject, calibrates);
end;
end.

View File

@@ -1,5 +1,5 @@
{ BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
Copyright (C) 2002-2003 Olivier Coursiere
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -15,12 +15,12 @@
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
}
unit serialport;
unit SerialPort;
interface
uses
beobj, SupportDefs, os;
BeObj, OS, SupportDefs;
type
// Pascal enum start at 0 (like in C++). We are lucky because we can't
@@ -48,15 +48,15 @@ type
public
constructor Create; override;
destructor Destroy; override;
function Open(portName : PChar) : Status_t;
function Open(portName : PChar) : status_t;
procedure Close;
function Read(buf : PChar; count : Size_t) : TSSize_t;
function Write(const buf : PChar; count : Size_t) : TSSize_t;
function Read(buf : PChar; count : size_t) : ssize_t;
function Write(const buf : PChar; count : size_t) : ssize_t;
procedure SetBlocking(Blocking : boolean);
function SetTimeout(microSeconds : TBigtime_t) : Status_t;
function SeDataRate(bitsPerSecond : DataRate) : Status_t;
procedure SetBlocking(Blocking : Boolean);
function SetTimeout(microSeconds : bigtime_t) : status_t;
function SeDataRate(bitsPerSecond : DataRate) : status_t;
function GeDataRate : DataRate;
procedure SeDataBits(numBits : DataBits);
function GeDataBits : DataBits;
@@ -69,18 +69,18 @@ type
procedure SetFlowControl(method : Cardinal);
function GetFlowControl : Cardinal;
function SetDTR(asserted : boolean) : Status_t;
function SetRTS(asserted : boolean) : Status_t;
function NumCharsAvailable(var wait_until_this_many : integer) : Status_t;
function SetDTR(asserted : Boolean) : status_t;
function SetRTS(asserted : Boolean) : status_t;
function NumCharsAvailable(var wait_until_this_many : Integer) : status_t;
function IsCTS : boolean;
function IsDSR : boolean;
function IsRI : boolean;
function IsDCD : boolean;
function WaitForInput : TSSize_t;
function IsCTS : Boolean;
function IsDSR : Boolean;
function IsRI : Boolean;
function IsDCD : Boolean;
function WaitForInput : ssize_t;
function CountDevices : integer;
function GetDeviceName(n : integer; name : PChar; bufSize : Size_t) : Status_t;
function CountDevices : Integer;
function GetDeviceName(n : Integer; name : PChar; bufSize : size_t) : status_t;
property DataRate : DataRate read GeDataRate write SeDataRate;
property DataBits : DataBits read GeDataBits write SeDataBits;
@@ -90,13 +90,13 @@ type
function BSerialPort_Create(AObject : TBeObject) : TCPlusObject; cdecl; external BePascalLibName name 'BSerialPort_Create';
procedure BSerialPort_Free(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BSerialPort_Free';
function BSerialPort_Open(AObject : TCPlusObject; portName : PChar) : Status_t; cdecl; external BePascalLibName name 'BSerialPort_Open';
function BSerialPort_Open(AObject : TCPlusObject; portName : PChar) : status_t; cdecl; external BePascalLibName name 'BSerialPort_Open';
procedure BSerialPort_Close(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BSerialPort_Close';
function BSerialPort_Read(AObject : TCPlusObject; buf : PChar; count : Size_t) : TSSize_t; cdecl; external BePascalLibName name 'BSerialPort_Read';
function BSerialPort_Write(AObject : TCPlusObject; const buf : PChar; count : Size_t) : TSSize_t; cdecl; external BePascalLibName name 'BSerialPort_Write';
procedure BSerialPort_SetBlocking(AObject : TCPlusObject; Blocking : boolean); cdecl; external BePascalLibName name 'BSerialPort_SetBlocking';
function BSerialPort_SetTimeout(AObject : TCPlusObject; microSeconds : TBigtime_t) : Status_t; cdecl; external BePascalLibName name 'BSerialPort_SetTimeout';
function BSerialPort_SeDataRate(AObject : TCPlusObject; bitsPerSecond : DataRate) : Status_t; cdecl; external BePascalLibName name 'BSerialPort_SeDataRate';
function BSerialPort_Read(AObject : TCPlusObject; buf : PChar; count : size_t) : ssize_t; cdecl; external BePascalLibName name 'BSerialPort_Read';
function BSerialPort_Write(AObject : TCPlusObject; const buf : PChar; count : Size_t) : ssize_t; cdecl; external BePascalLibName name 'BSerialPort_Write';
procedure BSerialPort_SetBlocking(AObject : TCPlusObject; Blocking : Boolean); cdecl; external BePascalLibName name 'BSerialPort_SetBlocking';
function BSerialPort_SetTimeout(AObject : TCPlusObject; microSeconds : bigtime_t) : status_t; cdecl; external BePascalLibName name 'BSerialPort_SetTimeout';
function BSerialPort_SeDataRate(AObject : TCPlusObject; bitsPerSecond : DataRate) : status_t; cdecl; external BePascalLibName name 'BSerialPort_SeDataRate';
function BSerialPort_DataRate(AObject : TCPlusObject) : DataRate; cdecl; external BePascalLibName name 'BSerialPort_DataRate';
procedure BSerialPort_SeDataBits(AObject : TCPlusObject; numBits : DataBits); cdecl; external BePascalLibName name 'BSerialPort_SeDataBits';
function BSerialPort_DataBits(AObject : TCPlusObject) : DataBits; cdecl; external BePascalLibName name 'BSerialPort_DataBits';
@@ -108,16 +108,16 @@ procedure BSerialPort_ClearInput(AObject : TCPlusObject); cdecl; external BePasc
procedure BSerialPort_ClearOutput(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BSerialPort_ClearOutput';
procedure BSerialPort_SetFlowControl(AObject : TCPlusObject; method : Cardinal); cdecl; external BePascalLibName name 'BSerialPort_SetFlowControl';
function BSerialPort_FlowControl(AObject : TCPlusObject) : Cardinal; cdecl; external BePascalLibName name 'BSerialPort_FlowControl';
function BSerialPort_SetDTR(AObject : TCPlusObject; asserted : boolean) : Status_t; cdecl; external BePascalLibName name 'BSerialPort_SetDTR';
function BSerialPort_SetRTS(AObject : TCPlusObject; asserted : boolean) : Status_t; cdecl; external BePascalLibName name 'BSerialPort_SetRTS';
function BSerialPort_NumCharsAvailable(AObject : TCPlusObject; var wait_until_this_many : integer) : Status_t; cdecl; external BePascalLibName name 'BSerialPort_NumCharsAvailable';
function BSerialPort_IsCTS(AObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BSerialPort_IsCTS';
function BSerialPort_IsDSR(AObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BSerialPort_IsDSR';
function BSerialPort_IsRI(AObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BSerialPort_IsRI';
function BSerialPort_IsDCD(AObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BSerialPort_IsDCD';
function BSerialPort_WaitForInput(AObject : TCPlusObject) : TSSize_t; cdecl; external BePascalLibName name 'BSerialPort_WaitForInput';
function BSerialPort_CountDevices(AObject : TCPlusObject) : integer; cdecl; external BePascalLibName name 'BSerialPort_CountDevices';
function BSerialPort_GetDeviceName(AObject : TCPlusObject; n : integer; name : PChar; bufSize : Size_t): Status_t; cdecl; external BePascalLibName name 'BSerialPort_GetDeviceName';
function BSerialPort_SetDTR(AObject : TCPlusObject; asserted : Boolean) : status_t; cdecl; external BePascalLibName name 'BSerialPort_SetDTR';
function BSerialPort_SetRTS(AObject : TCPlusObject; asserted : Boolean) : status_t; cdecl; external BePascalLibName name 'BSerialPort_SetRTS';
function BSerialPort_NumCharsAvailable(AObject : TCPlusObject; var wait_until_this_many : Integer) : Status_t; cdecl; external BePascalLibName name 'BSerialPort_NumCharsAvailable';
function BSerialPort_IsCTS(AObject : TCPlusObject) : Boolean; cdecl; external BePascalLibName name 'BSerialPort_IsCTS';
function BSerialPort_IsDSR(AObject : TCPlusObject) : Boolean; cdecl; external BePascalLibName name 'BSerialPort_IsDSR';
function BSerialPort_IsRI(AObject : TCPlusObject) : Boolean; cdecl; external BePascalLibName name 'BSerialPort_IsRI';
function BSerialPort_IsDCD(AObject : TCPlusObject) : Boolean; cdecl; external BePascalLibName name 'BSerialPort_IsDCD';
function BSerialPort_WaitForInput(AObject : TCPlusObject) : ssize_t; cdecl; external BePascalLibName name 'BSerialPort_WaitForInput';
function BSerialPort_CountDevices(AObject : TCPlusObject) : Integer; cdecl; external BePascalLibName name 'BSerialPort_CountDevices';
function BSerialPort_GetDeviceName(AObject : TCPlusObject; n : Integer; name : PChar; bufSize : Size_t): Status_t; cdecl; external BePascalLibName name 'BSerialPort_GetDeviceName';
implementation
@@ -134,7 +134,7 @@ begin
inherited;
end;
function BSerialPort.Open(portName : PChar) : Status_t;
function BSerialPort.Open(portName : PChar) : status_t;
begin
result := BSerialPort_Open(CPlusObject, portName);
end;
@@ -144,27 +144,27 @@ begin
BSerialPort_Close(CPlusObject);
end;
function BSerialPort.Read(buf : PChar; count : Size_t) : TSSize_t;
function BSerialPort.Read(buf : PChar; count : size_t) : ssize_t;
begin
Result := BSerialPort_Read(CPlusObject, buf, count);
end;
function BSerialPort.Write(const buf : PChar; count : Size_t) : TSSize_t;
function BSerialPort.Write(const buf : PChar; count : size_t) : ssize_t;
begin
Result := BSerialPort_Write(CPlusObject, buf, count);
end;
procedure BSerialPort.SetBlocking(Blocking : boolean);
procedure BSerialPort.SetBlocking(Blocking : Boolean);
begin
BSerialPort_SetBlocking(CPlusObject, Blocking);
end;
function BSerialPort.SetTimeout(microSeconds : TBigtime_t) : Status_t;
function BSerialPort.SetTimeout(microSeconds : bigtime_t) : status_t;
begin
Result := BSerialPort_SetTimeout(CPlusObject, microSeconds);
end;
function BSerialPort.SeDataRate(bitsPerSecond : DataRate) : Status_t;
function BSerialPort.SeDataRate(bitsPerSecond : DataRate) : status_t;
begin
Result := BSerialPort_SeDataRate(CPlusObject, bitsPerSecond);
end;
@@ -224,52 +224,52 @@ begin
Result := BSerialPort_FlowControl(CPlusObject);
end;
function BSerialPort.SetDTR(asserted : boolean) : Status_t;
function BSerialPort.SetDTR(asserted : Boolean) : status_t;
begin
Result := BSerialPort_SetDTR(CPlusObject, asserted);
end;
function BSerialPort.SetRTS(asserted : boolean) : Status_t;
function BSerialPort.SetRTS(asserted : Boolean) : status_t;
begin
Result := BSerialPort_SetRTS(CPlusObject, asserted);
end;
function BSerialPort.NumCharsAvailable(var wait_until_this_many : integer) : Status_t;
function BSerialPort.NumCharsAvailable(var wait_until_this_many : Integer) : status_t;
begin
Result := BSerialPort_NumCharsAvailable(CPlusObject, wait_until_this_many);
end;
function BSerialPort.IsCTS : boolean;
function BSerialPort.IsCTS : Boolean;
begin
Result := BSerialPort_IsCTS(CPlusObject);
end;
function BSerialPort.IsDSR : boolean;
function BSerialPort.IsDSR : Boolean;
begin
Result := BSerialPort_IsDSR(CPlusObject);
end;
function BSerialPort.IsRI : boolean;
function BSerialPort.IsRI : Boolean;
begin
Result := BSerialPort_IsRI(CPlusObject);
end;
function BSerialPort.IsDCD : boolean;
function BSerialPort.IsDCD : Boolean;
begin
Result := BSerialPort_IsDCD(CPlusObject);
end;
function BSerialPort.WaitForInput : TSSize_t;
function BSerialPort.WaitForInput : ssize_t;
begin
Result := BSerialPort_WaitForInput(CPlusObject);
end;
function BSerialPort.CountDevices : integer;
function BSerialPort.CountDevices : Integer;
begin
Result := BSerialPort_CountDevices(CPlusObject);
end;
function BSerialPort.GetDeviceName(n : integer; name : PChar; bufSize : Size_t) : Status_t;
function BSerialPort.GetDeviceName(n : Integer; name : PChar; bufSize : size_t) : status_t;
begin
Result := BSerialPort_GetDeviceName(CPlusObject, n, name, bufSize);
end;