-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathdevLibPCIOSD.h
More file actions
56 lines (42 loc) · 1.42 KB
/
devLibPCIOSD.h
File metadata and controls
56 lines (42 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*************************************************************************\
* Copyright (c) 2010 Brookhaven Science Associates, as Operator of
* Brookhaven National Laboratory.
* devLib2 is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
\*************************************************************************/
#ifndef DEVLIBPCIOSD_H_INC
#define DEVLIBPCIOSD_H_INC
#include <epicsMutex.h>
#include "devLibPCIImpl.h"
#ifdef __cplusplus
extern "C"
{
#endif
struct osdPCIDevice
{
epicsPCIDevice dev; /* "public" data */
/* result of mmap(), add offset before passing to user */
volatile void* base[PCIBARCOUNT];
/* offset from start of page to start of BAR */
epicsUInt32 offset[PCIBARCOUNT];
/* BAR length (w/o offset) */
epicsUInt32 len[PCIBARCOUNT];
volatile void* erom;
epicsUInt32 eromlen;
epicsUInt32 displayBAR[PCIBARCOUNT]; /* Raw PCI address */
epicsUInt32 displayErom;
int fd; /* /dev/uio# */
int cfd; /* config-space descriptor */
int rfd[PCIBARCOUNT];
int cmode; /* config-space mode */
epicsMutexId devLock; /* guard access to isrs list */
/* Optional callback invoked on PCI device hot-swap.*/
void (*onHotSwapHook)(struct osdPCIDevice*);
ELLNODE node;
ELLLIST isrs; /* contains struct osdISR */
};
typedef struct osdPCIDevice osdPCIDevice;
#ifdef __cplusplus
}
#endif
#endif /* DEVLIBPCIOSD_H_INC */