Difference between revisions of "Unit PCI"

From Ultibo.org
Jump to: navigation, search
(Created page with "Return to Unit Reference === Description === ---- ''To be documented'' === Constants === ---- ''To be documented'' === Type definitions === ---- ''To...")
 
 
(10 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
----
 
----
  
''To be documented''
+
'''Ultibo PCI/PCIe Interface unit'''
  
 
=== Constants ===
 
=== Constants ===
 
----
 
----
  
''To be documented''
+
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''PCI device, driver and host specific constants''' <code> PCI_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>PCI_DEVICE_PREFIX = 'PCI';</code>
 +
| style="width: 50%;"|Name prefix for PCI Devices
 +
|-
 +
| <code>PCI_DRIVER_PREFIX = 'PCI';</code>
 +
| Name prefix for PCI Drivers
 +
|-
 +
| <code>PCI_HOST_PREFIX = 'PCIHost';</code>
 +
| Name prefix for PCI Hosts
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''PCI device type''' <code> PCI_TYPE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>PCI_TYPE_NONE = 0;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>PCI_TYPE_MAX = 0;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>PCI_TYPE_NAMES:array[PCI_TYPE_NONE..PCI_TYPE_MAX] of String = ('PCI_TYPE_NONE');</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''PCI device state''' <code> PCI_STATE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>PCI_STATE_DETACHED = 0;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>PCI_STATE_DETACHING = 1;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PCI_STATE_ATTACHING = 2;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PCI_STATE_ATTACHED = 3;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>PCI_STATE_MAX = 3;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>PCI_STATE_NAMES:array[PCI_STATE_DETACHED..PCI_STATE_MAX] of String = ('PCI_STATE_DETACHED', 'PCI_STATE_DETACHING', 'PCI_STATE_ATTACHING', 'PCI_STATE_ATTACHED');</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''PCI device status''' <code> PCI_STATUS_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code> PCI_STATUS_UNBOUND = 0; </code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>PCI_STATUS_BOUND = 1;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>PCI_STATUS_MAX = 1;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>PCI_STATUS_NAMES:array[PCI_STATUS_UNBOUND..PCI_STATUS_MAX] of String = ('PCI_STATUS_UNBOUND', 'PCI_STATUS_BOUND');</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''PCI device flag''' <code> PCI_FLAG_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>PCI_FLAG_NONE = $00000000;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''PCI host type''' <code> PCIHOST_TYPE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>PCIHOST_TYPE_NONE = 0;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>PCIHOST_TYPE_PCI = 1;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PCIHOST_TYPE_PCIX = 2;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PCIHOST_TYPE_PCIE = 3;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>PCIHOST_TYPE_MAX = 3;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>PCIHOST_TYPE_NAMES:array[PCIHOST_TYPE_NONE..PCIHOST_TYPE_MAX] of String = ('PCIHOST_TYPE_NONE', 'PCIHOST_TYPE_PCI', 'PCIHOST_TYPE_PCIX', 'PCIHOST_TYPE_PCIE');</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''PCI host state''' <code> PCIHOST_STATE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>PCIHOST_STATE_DISABLED = 0;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>PCIHOST_STATE_ENABLED = 1;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>PCIHOST_STATE_MAX = 1;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>PCIHOST_STATE_NAMES:array[PCIHOST_STATE_DISABLED..PCIHOST_STATE_MAX] of String = ('PCIHOST_STATE_DISABLED','PCIHOST_STATE_ENABLED');</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''PCI host flag''' <code> PCIHOST_FLAG_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>PCIHOST_FLAG_NONE = $00000000;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>PCIHOST_FLAG_SHARED = $00000001;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PCIHOST_FLAG_NOCACHE = $00000002;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''PCI status code''' <code> PCI_STATUS_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>PCI_STATUS_SUCCESS = 0;</code>
 +
| style="width: 50%;"|Function successful
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''PCI logging''' <code> PCI_LOG_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>PCI_LOG_LEVEL_DEBUG = LOG_LEVEL_DEBUG;</code>
 +
| style="width: 50%;"|PCI debugging messages
 +
|-
 +
| <code>PCI_LOG_LEVEL_INFO = LOG_LEVEL_INFO;</code>
 +
| PCI informational messages, such as a device being attached or detached.
 +
|-
 +
| <code>PCI_LOG_LEVEL_WARN = LOG_LEVEL_WARN;</code>
 +
| PCI warning messages
 +
|-
 +
| <code>PCI_LOG_LEVEL_ERROR = LOG_LEVEL_ERROR;</code>
 +
| PCI error messages
 +
|-
 +
| <code>PCI_LOG_LEVEL_NONE = LOG_LEVEL_NONE;</code>
 +
| No PCI messages
 +
|-
 +
|}
 +
</div></div>
 +
<br />
  
 
=== Type definitions ===
 
=== Type definitions ===
 
----
 
----
  
''To be documented''
+
 
 +
'''PCI device'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PPCIDevice = ^TPCIDevice;</code>
 +
 
 +
<code>TPCIDevice = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|''Device Properties''
 +
|-
 +
| <code>Device:TDevice;</code>
 +
| style="width: 50%;"|The Device entry for this PCI device
 +
|-
 +
|colspan="2"|''PCI Properties''
 +
|-
 +
| <code>PCIId:LongWord;</code>
 +
| Unique Id of this PCI in the PCI device table
 +
|-
 +
| <code>PCIState:LongWord;</code>
 +
| PCI device state (eg PCI_STATE_ATTACHED)
 +
|-
 +
| <code>PCIStatus:LongWord;</code>
 +
| PCI device status (eg PCI_STATUS_BOUND)
 +
|-
 +
| <code>Host:PPCIHost;</code>
 +
| Host controller this PCI device is connected to (Set by PCI core)
 +
|-
 +
| <code>Parent:PPCIDevice;</code>
 +
| Parent this PCI device is connected to, if any (Set by PCI core)
 +
|-
 +
| <code>Driver:PPCIDriver;</code>
 +
| Driver this PCI device is bound to, if any (Set by PCI core)
 +
|-
 +
|colspan="2"|''Driver Properties''
 +
|-
 +
| <code>Lock:TMutexHandle;</code>
 +
| PCI device lock
 +
|-
 +
|colspan="2"|''Internal Properties''
 +
|-
 +
| <code>Prev:PPCIDevice;</code>
 +
| Previous entry in PCI device table
 +
|-
 +
| <code>Next:PPCIDevice;</code>
 +
| Next entry in PCI device table
 +
|-
 +
|}
 +
</div></div>
 +
 
 +
'''PCI device bind callback'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TPCIDeviceBind = function(Device:PPCIDevice):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''PCI device unbind callback'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TPCIDeviceUnbind = function(Device:PPCIDevice; Driver:PPCIDriver):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''PCI device enumeration callback'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TPCIDeviceEnumerate = function(Device:PPCIDevice; Data:Pointer):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''PCI device notification callback'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TPCIDeviceNotification = function(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''PCI driver'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PPCIDriver = ^TPCIDriver;</code>
 +
 
 +
<code>TPCIDriver = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|''Driver Properties''
 +
|-
 +
| <code>Driver:TDriver;</code>
 +
| style="width: 50%;"|The Driver entry for this PCI Driver
 +
|-
 +
|colspan="2"|''PCI Properties''
 +
|-
 +
| <code>DriverBind:TPCIDriverBind;</code>
 +
| A Driver specific DriverBind method implementing the standard PCI driver interface
 +
|-
 +
| <code>DriverUnbind:TPCIDriverUnbind;</code>
 +
| A Driver specific DriverUnbind method implementing the standard PCI driver interface
 +
|-
 +
|colspan="2"|''Interface Properties''
 +
|-
 +
| <code>Lock:TMutexHandle;</code>
 +
| Driver lock
 +
|-
 +
|colspan="2"|''Internal Properties''
 +
|-
 +
| <code>Prev:PPCIDriver;</code>
 +
| Previous entry in Driver table
 +
|-
 +
| <code>Next:PPCIDriver;</code>
 +
| Next entry in Driver table
 +
|-
 +
|}
 +
</div></div>
 +
 
 +
'''PCI driver enumeration callback'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TPCIDriverEnumerate = function(Driver:PPCIDriver; Data:Pointer):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''PCI driver bind'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TPCIDriverBind = function(Device:PPCIDevice):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''PCI driver unbind'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TPCIDriverUnbind = function(Device:PPCIDevice):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 +
'''PCI host'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PPCIHost = ^TPCIHost;</code>
 +
 
 +
<code>TPCIHost = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|''Device Properties''
 +
|-
 +
| <code>Device:TDevice;</code>
 +
| style="width: 50%;"|The Device entry for this PCI Host
 +
|-
 +
|colspan="2"|''PCI Properties''
 +
|-
 +
| <code>HostId:LongWord;</code>
 +
| Unique Id of this Host in the Host table
 +
|-
 +
| <code>HostState:LongWord</code>
 +
| Host state (eg PCIHOST_STATE_ENABLED)
 +
|-
 +
| <code>HostStart:TPCIHostStart;</code>
 +
| A Host specific HostStart method implementing the standard PCI host interface
 +
|-
 +
| <code>HostStop:TPCIHostStop;</code>
 +
| A Host specific HostStop method implementing the standard PCI host interface
 +
|-
 +
| <code>HostReset:TPCIHostReset;</code>
 +
| A Host specific HostReset method implementing the standard PCI host interface
 +
|-
 +
|colspan="2"|''Driver Properties''
 +
|-
 +
| <code>Lock:TMutexHandle;</code>
 +
| Host lock
 +
|-
 +
|colspan="2"|''Internal Properties''
 +
|-
 +
| <code>Prev:PPCIHost;</code>
 +
| Previous entry in Host table
 +
|-
 +
| <code>Next:PPCIHost;</code>
 +
| Next entry in Host table
 +
|-
 +
|}
 +
</div></div>
 +
 
 +
'''PCI host enumeration callback'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TPCIHostEnumerate = function(Host:PPCIHost; Data:Pointer):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''PCI host notification callback'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TPCIHostNotification = function(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|} 
 +
 
 +
'''PCI host start'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TPCIHostStart = function(Host:PPCIHost):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''PCI host stop'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TPCIHostStop = function(Host:PPCIHost):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''PCI host reset'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TPCIHostReset = function(Host:PPCIHost):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''PCI logging'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TPCILogOutput = procedure(const AText:String; Data:Pointer);</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
<br />
  
 
=== Public variables ===
 
=== Public variables ===
 
----
 
----
  
''To be documented''
+
 
 +
'''PCI logging'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>PCI_DEFAULT_LOG_LEVEL:LongWord = PCI_LOG_LEVEL_DEBUG;</code>
 +
| style="width: 40%;"|Minimum level for PCI messages. Only messages with level greater than or equal to this will be printed.
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>PCI_LOG_ENABLED:Boolean;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
<br />
  
 
=== Function declarations ===
 
=== Function declarations ===
 
----
 
----
  
''To be documented''
 
  
 +
'''Initialization functions'''
 +
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">procedure PCIInit;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Performs basic initialization of the PCI core driver, after this devices, hosts and drivers can be registered however nothing will work until PCIStart is called</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function PCIStart:LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Starts all registered PCI hosts and begins the PCI enumeration process</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function PCIStop:LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">procedure PCIAsyncStart(Host:PPCIHost);</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
 +
'''PCI device, driver and host functions'''
 +
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function PCIDeviceAllocate(Host:PPCIHost):PPCIDevice;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Create and Register a new Device entry in the Device table</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Host
 +
| The Host this device is attached to
 +
|-
 +
! Return
 +
| Pointer to new Device entry or nil if device could not be created
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function PCIDeviceRelease(Device:PPCIDevice):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Deregister and Destroy a Device from the Device table</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Device
 +
| The device to deregister and destroy
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if completed or another error code on failure
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function PCIDeviceFind(PCIId:LongWord):PPCIDevice;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function PCIDeviceFindById(VendorId,ProductId:Word):PPCIDevice;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function PCIDeviceFindByName(const Name:String):PPCIDevice; inline;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function PCIDeviceFindByDescription(const Description:String):PPCIDevice; inline;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function PCIDeviceEnumerate(Callback:TPCIDeviceEnumerate; Data:Pointer):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function PCIDeviceNotification(Device:PPCIDevice; Callback:TPCIDeviceNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function PCIDriverCreate:PPCIDriver;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Create a new PCI Driver entry</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Return
 +
| Pointer to new Driver entry or nil if driver could not be created
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function PCIDriverCreateEx(Size:LongWord):PPCIDriver;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Create a new PCI Driver entry</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Size
 +
| Size in bytes to allocate for new driver (Including the driver entry)
 +
|-
 +
! Return
 +
| Pointer to new Driver entry or nil if driver could not be created
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function PCIDriverDestroy(Driver:PPCIDriver):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Destroy an existing PCI Driver entry</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function PCIDriverRegister(Driver:PPCIDriver):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Register a new PCI Driver in the Driver table</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function PCIDriverDeregister(Driver:PPCIDriver):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Deregister a PCI Driver from the Driver table</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function PCIDriverFind(DriverId:LongWord):PPCIDriver;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Find a driver by Id in the PCI Driver table</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function PCIDriverFindByName(const Name:String):PPCIDriver; inline;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Find a driver by name in the Driver table</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function PCIDriverEnumerate(Callback:TPCIDriverEnumerate; Data:Pointer):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Enumerate all drivers in the PCI Driver table</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function PCIHostCreate:PPCIHost;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Create a new Host entry</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Return
 +
| Pointer to new Host entry or nil if host could not be created
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function PCIHostCreateEx(Size:LongWord):PPCIHost;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Create a new Host entry</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Size
 +
| Size in bytes to allocate for new host (Including the host entry)
 +
|-
 +
! Return
 +
| Pointer to new Host entry or nil if host could not be created
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function PCIHostDestroy(Host:PPCIHost):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Destroy an existing Host entry</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function PCIHostRegister(Host:PPCIHost):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Register a new Host in the Host table</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function PCIHostDeregister(Host:PPCIHost):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Deregister a Host from the Host table</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function PCIHostFind(HostId:LongWord):PPCIHost;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function PCIHostFindByName(const Name:String):PPCIHost; inline;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function PCIHostFindByDescription(const Description:String):PPCIHost; inline;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function PCIHostEnumerate(Callback:TPCIHostEnumerate; Data:Pointer):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function PCIHostNotification(Host:PPCIHost; Callback:TPCIHostNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
 +
'''PCI device, driver and host helper functions'''
 +
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function PCIDeviceGetCount:LongWord; inline;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current device count</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function PCIDeviceCheck(Device:PPCIDevice):PPCIDevice;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Check if the supplied Device is in the device table</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function PCIDriverGetCount:LongWord; inline;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current PCI driver count</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function PCIDriverCheck(Driver:PPCIDriver):PPCIDriver;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Check if the supplied PCI Driver is in the driver table</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function PCIHostGetCount:LongWord; inline;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current host count</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function PCIHostCheck(Host:PPCIHost):PPCIHost;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Check if the supplied Host is in the host table</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function PCIStatusToString(Status:LongWord):String;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Translates a PCI status code into a string</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function PCIDeviceTypeToString(PCIType:LongWord):String;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function PCIDeviceStateToString(PCIState:LongWord):String;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function PCIDeviceStatusToString(PCIStatus:LongWord):String;
 +
</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function PCIDeviceStateToNotification(State:LongWord):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Convert a Device state value into the notification code for device notifications</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function PCIDeviceStatusToNotification(Status:LongWord):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Convert a Device status value into the notification code for device notifications</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function PCIHostTypeToString(HostType:LongWord):String;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function PCIHostStateToString(HostState:LongWord):String;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function PCIHostStateToNotification(State:LongWord):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Convert a Host state value into the notification code for device notifications</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">procedure PCILog(Level:LongWord;Device:PPCIDevice; const AText:String);</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">procedure PCILogInfo(Device:PPCIDevice; const AText:String); inline;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">procedure PCILogWarn(Device:PPCIDevice; const AText:String); inline;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">procedure PCILogError(Device:PPCIDevice; const AText:String); inline;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">procedure PCILogDebug(Device:PPCIDevice; const AText:String); inline;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
  
 
Return to [[Unit_Reference|Unit Reference]]
 
Return to [[Unit_Reference|Unit Reference]]

Latest revision as of 04:59, 31 August 2021

Return to Unit Reference


Description


Ultibo PCI/PCIe Interface unit

Constants



[Expand]
PCI device, driver and host specific constants PCI_*


[Expand]
PCI device type PCI_TYPE_*


[Expand]
PCI device state PCI_STATE_*


[Expand]
PCI device status PCI_STATUS_*


[Expand]
PCI device flag PCI_FLAG_*


[Expand]
PCI host type PCIHOST_TYPE_*


[Expand]
PCI host state PCIHOST_STATE_*


[Expand]
PCI host flag PCIHOST_FLAG_*


[Expand]
PCI status code PCI_STATUS_*


[Expand]
PCI logging PCI_LOG_*


Type definitions



PCI device

[Expand]

PPCIDevice = ^TPCIDevice;

TPCIDevice = record

PCI device bind callback

TPCIDeviceBind = function(Device:PPCIDevice):LongWord;

PCI device unbind callback

TPCIDeviceUnbind = function(Device:PPCIDevice; Driver:PPCIDriver):LongWord;

PCI device enumeration callback

TPCIDeviceEnumerate = function(Device:PPCIDevice; Data:Pointer):LongWord;

PCI device notification callback

TPCIDeviceNotification = function(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;

PCI driver

[Expand]

PPCIDriver = ^TPCIDriver;

TPCIDriver = record

PCI driver enumeration callback

TPCIDriverEnumerate = function(Driver:PPCIDriver; Data:Pointer):LongWord;

PCI driver bind

TPCIDriverBind = function(Device:PPCIDevice):LongWord;

PCI driver unbind

TPCIDriverUnbind = function(Device:PPCIDevice):LongWord;

PCI host

[Expand]

PPCIHost = ^TPCIHost;

TPCIHost = record

PCI host enumeration callback

TPCIHostEnumerate = function(Host:PPCIHost; Data:Pointer):LongWord;

PCI host notification callback

TPCIHostNotification = function(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;

PCI host start

TPCIHostStart = function(Host:PPCIHost):LongWord;

PCI host stop

TPCIHostStop = function(Host:PPCIHost):LongWord;

PCI host reset

TPCIHostReset = function(Host:PPCIHost):LongWord;

PCI logging

TPCILogOutput = procedure(const AText:String; Data:Pointer);


Public variables



PCI logging

PCI_DEFAULT_LOG_LEVEL:LongWord = PCI_LOG_LEVEL_DEBUG; Minimum level for PCI messages. Only messages with level greater than or equal to this will be printed.
PCI_LOG_ENABLED:Boolean;


Function declarations



Initialization functions

[Expand]
procedure PCIInit;
Description: Performs basic initialization of the PCI core driver, after this devices, hosts and drivers can be registered however nothing will work until PCIStart is called


[Expand]
function PCIStart:LongWord;
Description: Starts all registered PCI hosts and begins the PCI enumeration process


[Expand]
function PCIStop:LongWord;
Description: To be documented


[Expand]
procedure PCIAsyncStart(Host:PPCIHost);
Description: To be documented


PCI device, driver and host functions

[Expand]
function PCIDeviceAllocate(Host:PPCIHost):PPCIDevice;
Description: Create and Register a new Device entry in the Device table


[Expand]
function PCIDeviceRelease(Device:PPCIDevice):LongWord;
Description: Deregister and Destroy a Device from the Device table


[Expand]
function PCIDeviceFind(PCIId:LongWord):PPCIDevice;
Description: To be documented


[Expand]
function PCIDeviceFindById(VendorId,ProductId:Word):PPCIDevice;
Description: To be documented


[Expand]
function PCIDeviceFindByName(const Name:String):PPCIDevice; inline;
Description: To be documented


[Expand]
function PCIDeviceFindByDescription(const Description:String):PPCIDevice; inline;
Description: To be documented


[Expand]
function PCIDeviceEnumerate(Callback:TPCIDeviceEnumerate; Data:Pointer):LongWord;
Description: To be documented


[Expand]
function PCIDeviceNotification(Device:PPCIDevice; Callback:TPCIDeviceNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
Description: To be documented


[Expand]
function PCIDriverCreate:PPCIDriver;
Description: Create a new PCI Driver entry


[Expand]
function PCIDriverCreateEx(Size:LongWord):PPCIDriver;
Description: Create a new PCI Driver entry


[Expand]
function PCIDriverDestroy(Driver:PPCIDriver):LongWord;
Description: Destroy an existing PCI Driver entry


[Expand]
function PCIDriverRegister(Driver:PPCIDriver):LongWord;
Description: Register a new PCI Driver in the Driver table


[Expand]
function PCIDriverDeregister(Driver:PPCIDriver):LongWord;
Description: Deregister a PCI Driver from the Driver table


[Expand]
function PCIDriverFind(DriverId:LongWord):PPCIDriver;
Description: Find a driver by Id in the PCI Driver table


[Expand]
function PCIDriverFindByName(const Name:String):PPCIDriver; inline;
Description: Find a driver by name in the Driver table


[Expand]
function PCIDriverEnumerate(Callback:TPCIDriverEnumerate; Data:Pointer):LongWord;
Description: Enumerate all drivers in the PCI Driver table


[Expand]
function PCIHostCreate:PPCIHost;
Description: Create a new Host entry


[Expand]
function PCIHostCreateEx(Size:LongWord):PPCIHost;
Description: Create a new Host entry


[Expand]
function PCIHostDestroy(Host:PPCIHost):LongWord;
Description: Destroy an existing Host entry


[Expand]
function PCIHostRegister(Host:PPCIHost):LongWord;
Description: Register a new Host in the Host table


[Expand]
function PCIHostDeregister(Host:PPCIHost):LongWord;
Description: Deregister a Host from the Host table


[Expand]
function PCIHostFind(HostId:LongWord):PPCIHost;
Description: To be documented


[Expand]
function PCIHostFindByName(const Name:String):PPCIHost; inline;
Description: To be documented


[Expand]
function PCIHostFindByDescription(const Description:String):PPCIHost; inline;
Description: To be documented


[Expand]
function PCIHostEnumerate(Callback:TPCIHostEnumerate; Data:Pointer):LongWord;
Description: To be documented


[Expand]
function PCIHostNotification(Host:PPCIHost; Callback:TPCIHostNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
Description: To be documented


PCI device, driver and host helper functions

[Expand]
function PCIDeviceGetCount:LongWord; inline;
Description: Get the current device count


[Expand]
function PCIDeviceCheck(Device:PPCIDevice):PPCIDevice;
Description: Check if the supplied Device is in the device table


[Expand]
function PCIDriverGetCount:LongWord; inline;
Description: Get the current PCI driver count


[Expand]
function PCIDriverCheck(Driver:PPCIDriver):PPCIDriver;
Description: Check if the supplied PCI Driver is in the driver table


[Expand]
function PCIHostGetCount:LongWord; inline;
Description: Get the current host count


[Expand]
function PCIHostCheck(Host:PPCIHost):PPCIHost;
Description: Check if the supplied Host is in the host table


[Expand]
function PCIStatusToString(Status:LongWord):String;
Description: Translates a PCI status code into a string


[Expand]
function PCIDeviceTypeToString(PCIType:LongWord):String;
Description: To be documented


[Expand]
function PCIDeviceStateToString(PCIState:LongWord):String;
Description: To be documented


[Expand]
function PCIDeviceStatusToString(PCIStatus:LongWord):String;
Description: To be documented


[Expand]
function PCIDeviceStateToNotification(State:LongWord):LongWord;
Description: Convert a Device state value into the notification code for device notifications


[Expand]
function PCIDeviceStatusToNotification(Status:LongWord):LongWord;
Description: Convert a Device status value into the notification code for device notifications


[Expand]
function PCIHostTypeToString(HostType:LongWord):String;
Description: To be documented


[Expand]
function PCIHostStateToString(HostState:LongWord):String;
Description: To be documented


[Expand]
function PCIHostStateToNotification(State:LongWord):LongWord;
Description: Convert a Host state value into the notification code for device notifications


[Expand]
procedure PCILog(Level:LongWord;Device:PPCIDevice; const AText:String);
Description: To be documented


[Expand]
procedure PCILogInfo(Device:PPCIDevice; const AText:String); inline;
Description: To be documented


[Expand]
procedure PCILogWarn(Device:PPCIDevice; const AText:String); inline;
Description: To be documented


[Expand]
procedure PCILogError(Device:PPCIDevice; const AText:String); inline;
Description: To be documented


[Expand]
procedure PCILogDebug(Device:PPCIDevice; const AText:String); inline;
Description: To be documented


Return to Unit Reference