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