Port I/O group
function GetPortByte(nPort: Word): Byte;
function GetPortWord(nPort: Word): Word;
function GetPortLong(nPort: Word): Cardinal;
procedure SetPortByte(nPort: Word; bValue: Byte);
procedure SetPortWord(nPort: Word; wValue: Word);
procedure SetPortLong(nPort: Word; dValue: Cardinal);
Memory group
function MapPhysToLinear(PhAddr: Cardinal; PhSize: Cardinal): Cardinal;
function GetMemByte(MappedAddr: Cardinal; Offset: Cardinal): Byte;
function GetMemWord(MappedAddr: Cardinal; Offset: Cardinal): Word;
function GetMemLong(MappedAddr: Cardinal; Offset: Cardinal): Cardinal;
procedure SetMemByte(MappedAddr: Cardinal; Offset: Cardinal; bValue: Byte);
procedure SetMemWord(MappedAddr: Cardinal; Offset: Cardinal; wValue: Word);
procedure SetMemLong(MappedAddr: Cardinal; Offset: Cardinal; dValue: Cardinal);
PCI group
function OpenPciDevice(Bus, Dev, Funct: Cardinal): Integer;
procedure GetPciLocation(PciDevice: Cardinal; var Bus: Byte; var Dev: Byte; var Funct: Byte);
function ReadFromPci(PciDevice: Cardinal; Offset: Cardinal; Length: Cardinal): Cardinal;
procedure WriteToPci (PciDevice: Cardinal; Offset: Cardinal; Length: Cardinal; Data: Cardinal);
function GetPciBarPhysicalAddress(PciDevice: Cardinal; BarNumber: Word): Cardinal;
function ReadPciBarByte (PciDevice: Cardinal; BarNumber: Word; BarOffset: Cardinal): Byte;
function ReadPciBarWord (PciDevice: Cardinal; BarNumber: Word; BarOffset: Cardinal): Word;
function ReadPciBarLong (PciDevice: Cardinal; BarNumber: Word; BarOffset: Cardinal): Cardinal;
procedure WritePciBarByte(PciDevice: Cardinal; BarNumber: Word; BarOffset: Cardinal; bValue: Byte);
procedure WritePciBarWord(PciDevice: Cardinal; BarNumber: Word; BarOffset: Cardinal; wValue: Word);
procedure WritePciBarLong(PciDevice: Cardinal; BarNumber: Word; BarOffset: Cardinal; dwValue: Cardinal);
function ReadPciCommandReg(PciDevice: Cardinal):Word;
procedure WritePciCommandReg(PciDevice: Cardinal; CommandRegValue: Word);
procedure ControlPciCommandRegBits(PciDevice: Cardinal; CommandRegBit: Word; SetClearFlag: Word);
function ReadPciStatusReg(PciDevice: Cardinal; ClearBitMask: Word): Word;
USB group
function OpenUsbDevice(DevNumber : Byte) : Cardinal;
function CloseUsbDevice(UsbDevice : Cardinal) : Boolean;
function UsbTransfer(UsbDevice : Cardinal;
PipeNumber : Byte;
var Buffer : array of Byte;
var BytesReturned : Cardinal) : Boolean;
function UsbVendorRequest(UsbDevice : Cardinal;
DirectionIn : Boolean;
RequestRecipient : Byte;
ReservedBits : Byte;
Request : Byte;
Value : Word;
Index : Word;
var Buffer: array of Byte;
var NumberOfBytesTransferred : Cardinal) : Boolean;
function UsbClassRequest(UsbDevice : Cardinal;
DirectionIn : Boolean;
RequestRecipient : Byte;
ReservedBits : Byte;
Request : Byte;
Value : Word;
Index : Word;
var Buffer: array of Byte;
var NumberOfBytesTransferred : Cardinal) : Boolean;
function UsbSetFeature(UsbDevice : Cardinal;
RequestRecipient : Byte;
FeatureSelector : Word;
Index : Word) : Boolean;
function UsbClearFeature(UsbDevice : Cardinal;
RequestRecipient : Byte;
FeatureSelector : Word;
Index : Word) : Boolean;
function UsbGetStatus(UsbDevice : Cardinal;
RequestRecipient : Byte;
Index : Word;
var Status : Word) : Boolean;
Service Group
function HexByte(b: Byte): String;
function HexWord(w: Word): String;
function HexLong(d: Cardinal): String;
procedure HexPrint(sComment:String; Val: Cardinal);
procedure DecPrint(sComment:String; Val: Cardinal);
procedure StringPrint(s:String);
procedure HexDump(dump: Variant; NumOfBytes: Cardinal);
procedure Delay(us: Longword);
function GetCurrentProjectType(): Integer; // see constants
|