* * Author: Michael Davidsaver <*****@*****.**> */ #include <memory> #include <iocsh.h> #include <epicsExport.h> #include <devLibPCI.h> #include "evr_frib.h" #include "evrFRIBRegMap.h" static const epicsPCIID evr_frib_ids[] = { DEVPCI_SUBDEVICE_SUBVENDOR(0xfdbe, 0x10ee, 0x1234, 0x10ee), // BPM // DEVPCI_SUBDEVICE_SUBVENDOR(0xfbad, 0x10ee, 0x1234, 0x10ee), DEVPCI_END }; void fribEvrSetupPCI(const char *name, const char *pcispec) { try { const epicsPCIDevice *dev = NULL; if(devPCIFindSpec(evr_frib_ids, pcispec, &dev, 0)) { fprintf(stderr, "No such device: %s\n", pcispec); return; } fprintf(stderr, "Found device\n");
#else static int checkUIOVersion(int expect) {return 0;} #endif /** * This function and definitions add support for cPCI EVG. * Function works similiar to that of EVR device support and reilies on devLib2 * + mrf_uio kernel module to map EVG address space. * * Change by: tslejko * Reason: cPCI EVG support */ static const epicsPCIID mrmevgs[] = { DEVPCI_SUBDEVICE_SUBVENDOR(PCI_DEVICE_ID_PLX_9030, PCI_VENDOR_ID_PLX,PCI_DEVICE_ID_MRF_PXIEVG230, PCI_VENDOR_ID_MRF), DEVPCI_END }; extern "C" epicsStatus mrmEvgSetupPCI ( const char* id, // Card Identifier int b, // Bus number int d, // Device number int f, // Function number bool ignoreVersion) // Ignore errors due to kernel module and firmware version checks { deviceInfoT deviceInfo; deviceInfo.bus.busType = busType_pci; deviceInfo.bus.pci.bus = b;