Difference between revisions of "Unit PCI"
From Ultibo.org
| Line 185: | Line 185: | ||
---- | ---- | ||
| − | |||
| + | '''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 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 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 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 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 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:''' 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 PCIDriverFindByName(const Name:String):PPCIDriver; 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 PCIDriverEnumerate(Callback:TPCIDriverEnumerate; 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 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 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 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;">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]] | ||
Revision as of 06:26, 19 June 2021
Return to Unit Reference
Description
Ultibo PCI/PCIe interface unit
Constants
PCI device, driver and host specific constants
PCI_* PCI_DEVICE_PREFIX = 'PCI';
|
Name prefix for PCI Devices |
PCI_DRIVER_PREFIX = 'PCI';
|
Name prefix for PCI Drivers |
PCI_HOST_PREFIX = 'PCIHost';
|
Name prefix for PCI Hosts |
PCI device type
PCI_TYPE_* PCI_TYPE_NONE = 0;
|
|
PCI_TYPE_MAX = 0;
|
|
PCI_TYPE_NAMES:array[PCI_TYPE_NONE..PCI_TYPE_MAX] of String = ('PCI_TYPE_NONE');
|
|
PCI device flag
PCI_FLAG_* PCI_FLAG_NONE = $00000000;
|
PCI host type
PCIHOST_TYPE_* PCIHOST_TYPE_NONE = 0;
|
|
PCIHOST_TYPE_MAX = 0;
|
|
PCIHOST_TYPE_NAMES:array[PCIHOST_TYPE_NONE..PCIHOST_TYPE_MAX] of String = ('PCIHOST_TYPE_NONE');
|
|
PCI host state
PCIHOST_STATE_* PCIHOST_STATE_DISABLED = 0;
|
|
PCIHOST_STATE_ENABLED = 1;
|
|
PCIHOST_STATE_MAX = 1;
|
|
PCIHOST_STATE_NAMES:array[PCIHOST_STATE_DISABLED..PCIHOST_STATE_MAX] of String = ('PCIHOST_STATE_DISABLED','PCIHOST_STATE_ENABLED');
|
|
PCI host flag
PCIHOST_FLAG_* PCIHOST_FLAG_NONE = $00000000;
|
|
PCIHOST_FLAG_SHARED = $00000001;
|
|
PCIHOST_FLAG_NOCACHE = $00000002;
|
PCI status code
PCI_STATUS_* PCI_STATUS_SUCCESS = 0;
|
Function successful |
PCI logging
PCI_LOG_* PCI_LOG_LEVEL_DEBUG = LOG_LEVEL_DEBUG;
|
PCI debugging messages |
PCI_LOG_LEVEL_INFO = LOG_LEVEL_INFO;
|
PCI informational messages, such as a device being attached or detached. |
PCI_LOG_LEVEL_WARN = LOG_LEVEL_WARN;
|
PCI warning messages |
PCI_LOG_LEVEL_ERROR = LOG_LEVEL_ERROR;
|
PCI error messages |
PCI_LOG_LEVEL_NONE = LOG_LEVEL_NONE;
|
No PCI messages |
Type definitions
To be documented
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
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
| Note | None documented |
|---|
function PCIStart:LongWord;
Description: Starts all registered PCI hosts and begins the PCI enumeration process
| Note | None documented |
|---|
function PCIStop:LongWord;
Description: To be documented
| Note | None documented |
|---|
procedure PCIAsyncStart(Host:PPCIHost);
Description: To be documented
| Note | None documented |
|---|
PCI device, driver and host functions
function PCIDeviceAllocate(Host:PPCIHost):PPCIDevice;
Description: Create and Register a new Device entry in the Device table
| Host | The Host this device is attached to |
|---|---|
| Return | Pointer to new Device entry or nil if device could not be created |
function PCIDeviceRelease(Device:PPCIDevice):LongWord;
Description: Deregister and Destroy a Device from the Device table
| Device | The device to deregister and destroy |
|---|---|
| Return | ERROR_SUCCESS if completed or another error code on failure |
function PCIDeviceFind(PCIId:LongWord):PPCIDevice;
Description: To be documented
| Note | None documented |
|---|
function PCIDeviceFindById(VendorId,ProductId:Word):PPCIDevice;
Description: To be documented
| Note | None documented |
|---|
function PCIDeviceFindByName(const Name:String):PPCIDevice; inline;
Description: To be documented
| Note | None documented |
|---|
function PCIDeviceFindByDescription(const Description:String):PPCIDevice; inline;
Description: To be documented
| Note | None documented |
|---|
function PCIDeviceEnumerate(Callback:TPCIDeviceEnumerate; Data:Pointer):LongWord;
Description: To be documented
| Note | None documented |
|---|
function PCIDeviceNotification(Device:PPCIDevice; Callback:TPCIDeviceNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
Description: To be documented
| Note | None documented |
|---|
function PCIDriverCreate:PPCIDriver;
Description: Create a new Driver entry
| Return | Pointer to new Driver entry or nil if driver could not be created |
|---|
function PCIDriverCreateEx(Size:LongWord):PPCIDriver;
Description: Create a new Driver entry
| 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 |
function PCIDriverDestroy(Driver:PPCIDriver):LongWord;
Description: Destroy an existing Driver entry
| Note | None documented |
|---|
function PCIDriverRegister(Driver:PPCIDriver):LongWord;
Description: Register a new Driver in the Driver table
| Note | None documented |
|---|
function PCIDriverDeregister(Driver:PPCIDriver):LongWord;
Description: Deregister a Driver from the Driver table
| Note | None documented |
|---|
function PCIDriverFind(DriverId:LongWord):PPCIDriver;
Description: To be documented
| Note | None documented |
|---|
function PCIDriverFindByName(const Name:String):PPCIDriver; inline;
Description: To be documented
| Note | None documented |
|---|
function PCIDriverEnumerate(Callback:TPCIDriverEnumerate; Data:Pointer):LongWord;
Description: To be documented
| Note | None documented |
|---|
function PCIHostCreate:PPCIHost;
Description: Create a new Host entry
| Return | Pointer to new Host entry or nil if host could not be created |
|---|
function PCIHostCreateEx(Size:LongWord):PPCIHost;
Description: Create a new Host entry
| 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 |
function PCIHostDestroy(Host:PPCIHost):LongWord;
Description: Destroy an existing Host entry
| Note | None documented |
|---|
function PCIHostRegister(Host:PPCIHost):LongWord;
Description: Register a new Host in the Host table
| Note | None documented |
|---|
function PCIHostDeregister(Host:PPCIHost):LongWord;
Description: Deregister a Host from the Host table
| Note | None documented |
|---|
function PCIHostFind(HostId:LongWord):PPCIHost;
Description: To be documented
| Note | None documented |
|---|
function PCIHostFindByName(const Name:String):PPCIHost; inline;
Description: To be documented
| Note | None documented |
|---|
function PCIHostFindByDescription(const Description:String):PPCIHost; inline;
Description: To be documented
| Note | None documented |
|---|
function PCIHostEnumerate(Callback:TPCIHostEnumerate; Data:Pointer):LongWord;
Description: To be documented
| Note | None documented |
|---|
function PCIHostNotification(Host:PPCIHost; Callback:TPCIHostNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
Description: To be documented
| Note | None documented |
|---|
PCI device, driver and host helper functions
function PCIDeviceGetCount:LongWord; inline;
Description: Get the current device count
| Note | None documented |
|---|
function PCIDeviceCheck(Device:PPCIDevice):PPCIDevice;
Description: Check if the supplied Device is in the device table
| Note | None documented |
|---|
function PCIDriverGetCount:LongWord; inline;
Description: Get the current driver count
| Note | None documented |
|---|
function PCIDriverCheck(Driver:PPCIDriver):PPCIDriver;
Description: Check if the supplied Driver is in the driver table
| Note | None documented |
|---|
function PCIHostGetCount:LongWord; inline;
Description: Get the current host count
| Note | None documented |
|---|
function PCIHostCheck(Host:PPCIHost):PPCIHost;
Description: Check if the supplied Host is in the host table
| Note | None documented |
|---|
function PCIStatusToString(Status:LongWord):String;
Description: Translates a PCI status code into a string
| Note | None documented |
|---|
procedure PCILog(Level:LongWord;Device:PPCIDevice; const AText:String);
Description: To be documented
| Note | None documented |
|---|
procedure PCILogInfo(Device:PPCIDevice; const AText:String); inline;
Description: To be documented
| Note | None documented |
|---|
procedure PCILogWarn(Device:PPCIDevice; const AText:String); inline;
Description: To be documented
| Note | None documented |
|---|
procedure PCILogError(Device:PPCIDevice; const AText:String); inline;
Description: To be documented
| Note | None documented |
|---|
procedure PCILogDebug(Device:PPCIDevice; const AText:String); inline;
Description: To be documented
| Note | None documented |
|---|
Return to Unit Reference