devLib2  2.11
Data Structures | Macros | Typedefs | Functions | Variables
devLibPCI.h File Reference
#include <dbDefs.h>
#include <epicsTypes.h>
#include <devLib.h>
#include <shareLib.h>

Go to the source code of this file.

Data Structures

struct  epicsPCIID
 PCI device identifier. More...
 
struct  PCIBar
 
struct  epicsPCIDevice
 Device token. More...
 

Macros

#define DEVLIBPCI_MAJOR   1
 API major version. More...
 
#define DEVLIBPCI_MINOR   3
 API minor version. More...
 
#define DEVPCI_ANY_DEVICE   0x10000
 
#define DEVPCI_ANY_VENDOR   0x10000
 
#define DEVPCI_ANY_SUBDEVICE   0x10000
 
#define DEVPCI_ANY_SUBVENDOR   0x10000
 
#define DEVPCI_ANY_CLASS   0x1000000
 
#define DEVPCI_ANY_REVISION   0x100
 
#define DEVPCI_LAST_DEVICE   0xffff0000
 
#define DEVPCI_END   {DEVPCI_LAST_DEVICE,0,0,0,0,0}
 The last item in a list of PCI IDS. More...
 
#define DEVPCI_DEVICE_ANY()
 
#define DEVPCI_DEVICE_VENDOR(dev, vend)
 
#define DEVPCI_DEVICE_VENDOR_CLASS(dev, vend, pclass)
 
#define DEVPCI_SUBDEVICE_SUBVENDOR(dev, vend, sdev, svend)
 
#define DEVPCI_SUBDEVICE_SUBVENDOR_CLASS(dev, vend, sdev, svend, revision, pclass)
 
#define DEVPCI_NO_SLOT   NULL
 
#define PCIBARCOUNT   NELEMENTS( ((epicsPCIDevice*)0)->bar )
 The maximum number of base address registers (BARs). More...
 
#define DEVLIB_MAP_UIO1TO1   0
 
#define DEVLIB_MAP_UIOCOMPACT   0
 

Typedefs

typedef int(* devPCISearchFn) (void *ptr, const epicsPCIDevice *dev)
 PCI search callback prototype. More...
 

Functions

epicsShareFunc int devPCIFindCB (const epicsPCIID *idlist, devPCISearchFn searchfn, void *arg, unsigned int opt)
 PCI bus search w/ callback. More...
 
epicsShareFunc int devPCIFindSpec (const epicsPCIID *idlist, const char *spec, const epicsPCIDevice **found, unsigned int opt)
 PCI bus search by specification string. More...
 
epicsShareFunc int devPCIFindDBDF (const epicsPCIID *idlist, unsigned int domain, unsigned int b, unsigned int d, unsigned int f, const epicsPCIDevice **found, unsigned int opt)
 PCI bus probe. More...
 
epicsShareFunc int devPCIFindBDF (const epicsPCIID *idlist, unsigned int b, unsigned int d, unsigned int f, const epicsPCIDevice **found, unsigned int opt)
 
epicsShareFunc int devPCIToLocalAddr (const epicsPCIDevice *id, unsigned int bar, volatile void **ppLocalAddr, unsigned int opt)
 Get pointer to PCI BAR. More...
 
epicsShareFunc int devPCIBarLen (const epicsPCIDevice *id, unsigned int bar, epicsUInt32 *len)
 Find the size of a BAR. More...
 
epicsShareFunc int devPCIConnectInterrupt (const epicsPCIDevice *id, void(*pFunction)(void *), void *parameter, unsigned int opt)
 Request interrupts for device. More...
 
epicsShareFunc int devPCIDisconnectInterrupt (const epicsPCIDevice *id, void(*pFunction)(void *), void *parameter)
 Stop receiving interrupts. More...
 
epicsShareFunc void devPCIShow (int lvl, int vendor, int device, int exact)
 
epicsShareFunc void devPCIShowMatch (int lvl, const char *spec, int vendor, int device)
 
epicsShareFunc void devPCIShowDevice (int lvl, const epicsPCIDevice *dev)
 
epicsShareFunc int devLibPCIUse (const char *name)
 Select driver implementation. Pick driver implementation by name, or NULL to use default. If no selection is made then the default will be used if available. More...
 
epicsShareFunc const char * devLibPCIDriverName ()
 
epicsShareFunc int devPCIConfigRead8 (const epicsPCIDevice *dev, unsigned offset, epicsUInt8 *pResult)
 Read byte from configuration space. More...
 
epicsShareFunc int devPCIConfigRead16 (const epicsPCIDevice *dev, unsigned offset, epicsUInt16 *pResult)
 Read (16-bit) word from configuration space. More...
 
epicsShareFunc int devPCIConfigRead32 (const epicsPCIDevice *dev, unsigned offset, epicsUInt32 *pResult)
 Read (32-bit) dword from configuration space. More...
 
epicsShareFunc int devPCIConfigWrite8 (const epicsPCIDevice *dev, unsigned offset, epicsUInt8 value)
 Write byte to configuration space. More...
 
epicsShareFunc int devPCIConfigWrite16 (const epicsPCIDevice *dev, unsigned offset, epicsUInt16 value)
 Write (16-bit) word from configuration space. More...
 
epicsShareFunc int devPCIConfigWrite32 (const epicsPCIDevice *dev, unsigned offset, epicsUInt32 value)
 Write (32-bit) dword from configuration space. More...
 
epicsShareFunc int devPCIEnableInterrupt (const epicsPCIDevice *dev)
 Enable interrupts at the device. More...
 
epicsShareFunc int devPCIDisableInterrupt (const epicsPCIDevice *dev)
 Enable interrupts at the device. More...
 
epicsShareFunc const char * devPCIDeviceClassToString (int classId)
 Translate class id to string. More...
 

Variables

epicsShareExtern int devPCIDebug