15 #include <epicsTypes.h> 17 #include <devLibPCI.h> 25 static const epicsPCIID mrmevrs[] = {
41 int printevr(
void* raw,
const epicsPCIDevice* dev)
43 epicsUInt32 i, offset, length;
45 volatile epicsUInt32 *base;
47 devPCIShowDevice(2,dev);
49 if (devPCIToLocalAddr(dev, a->
bar, (
volatile void**)(
void *)&base, DEVLIB_MAP_UIO1TO1)) {
50 fprintf(stderr,
"Failed to map bar 0x%x\n", a->
bar);
54 offset = (epicsUInt32)a->
offset;
55 length = (epicsUInt32)a->
len;
57 for (i=offset/4; i < (offset + length)/4; i++) {
59 printf(
"\n%08x : ", 4*i);
61 printf(
"%08x ",base[i]);
68 int main(
int argc,
char* argv[])
76 fprintf(stderr,
"Usage: evrdump [BAR#] [Length] [offset]\n");
78 if (argc>=2) a.
bar=atoi(argv[1]);
79 if (argc>=3) a.
len=atoi(argv[2]);
80 if (argc>=4) a.
offset=atoi(argv[3]);
82 devPCIFindCB(mrmevrs, &
printevr, &a, 0);
int main(int argc, char *argv[])
#define PCI_DEVICE_ID_MRF_PMCEVR_230
#define PCI_VENDOR_ID_LATTICE
#define PCI_VENDOR_ID_PLX
#define PCI_DEVICE_ID_MRF_PXIEVR_230
#define PCI_VENDOR_ID_MRF
#define PCI_DEVICE_ID_EC_30
#define PCI_DEVICE_ID_MRF_EVRTG_300E
#define PCI_DEVICE_ID_MRF_EVRTG_300
epicsShareFunc void devLibPCIRegisterBaseDefault(void)
#define PCI_DEVICE_ID_PLX_9056
#define PCI_DEVICE_ID_PLX_9030
int printevr(void *raw, const epicsPCIDevice *dev)