Last change
on this file since 2273 was 22, checked in by ogrimm, 16 years ago |
First commit of drsdaq program
|
-
Property svn:executable
set to
*
|
File size:
1.7 KB
|
Line | |
---|
1 | /************************************************************************/
|
---|
2 | /* */
|
---|
3 | /* This is the common header file for the IO_RCC */
|
---|
4 | /* library & applications */
|
---|
5 | /* */
|
---|
6 | /* 6. Jun. 02 MAJO created */
|
---|
7 | /* */
|
---|
8 | /*******C 2002 - The software with that certain something****************/
|
---|
9 |
|
---|
10 | #ifndef _IO_RCC_COMMON_H
|
---|
11 | #define _IO_RCC_COMMON_H
|
---|
12 |
|
---|
13 | #ifdef __KERNEL__
|
---|
14 | #include <linux/types.h>
|
---|
15 | #define P_ID_IO_RCC 8 // Needs to be re-defined here since we do not want to include rcc_error.h at this level
|
---|
16 | #else
|
---|
17 | #include <sys/types.h>
|
---|
18 | #endif
|
---|
19 |
|
---|
20 | typedef u_int IO_ErrorCode_t;
|
---|
21 |
|
---|
22 | //Board types
|
---|
23 | #define VP_UNKNOWN 0
|
---|
24 | #define VP_PSE 1
|
---|
25 | #define VP_PMC 2
|
---|
26 | #define VP_100 3
|
---|
27 | #define VP_CP1 4
|
---|
28 |
|
---|
29 | //Stolen from /usr/src/linuxcern/includelinux/ioport.h
|
---|
30 | #define IORESOURCE_IO 0x00000100
|
---|
31 | #define IORESOURCE_MEM 0x00000200
|
---|
32 |
|
---|
33 | typedef struct
|
---|
34 | {
|
---|
35 | u_int offset;
|
---|
36 | u_int data;
|
---|
37 | u_int size;
|
---|
38 | } IO_RCC_IO_t;
|
---|
39 |
|
---|
40 | typedef struct
|
---|
41 | {
|
---|
42 | u_int board_manufacturer;
|
---|
43 | u_int board_type;
|
---|
44 | u_int operating_system_type;
|
---|
45 | u_int operating_system_version;
|
---|
46 | } HostInfo_t;
|
---|
47 |
|
---|
48 | typedef struct
|
---|
49 | {
|
---|
50 | u_int vid;
|
---|
51 | u_int did;
|
---|
52 | u_int occ;
|
---|
53 | u_int handle;
|
---|
54 | } IO_PCI_FIND_t;
|
---|
55 |
|
---|
56 | typedef struct
|
---|
57 | {
|
---|
58 | u_int handle;
|
---|
59 | u_int offs;
|
---|
60 | u_int func;
|
---|
61 | u_int data;
|
---|
62 | u_int size;
|
---|
63 | } IO_PCI_CONF_t;
|
---|
64 |
|
---|
65 | typedef struct
|
---|
66 | {
|
---|
67 | u_int base;
|
---|
68 | u_int size;
|
---|
69 | u_int flags;
|
---|
70 | } pci_bar;
|
---|
71 |
|
---|
72 | typedef struct
|
---|
73 | {
|
---|
74 | u_int handle;
|
---|
75 | pci_bar bar[6];
|
---|
76 | } pci_info_t;
|
---|
77 |
|
---|
78 |
|
---|
79 | // Error codes
|
---|
80 | enum
|
---|
81 | {
|
---|
82 | IO_RCC_SUCCESS = 0,
|
---|
83 | IO_RCC_ERROR_FAIL = (P_ID_IO_RCC <<8)+1,
|
---|
84 | IO_RCC_FILE,
|
---|
85 | IO_RCC_NOTOPEN,
|
---|
86 | IO_RCC_MMAP,
|
---|
87 | IO_RCC_MUNMAP,
|
---|
88 | IO_RCC_ILLMANUF,
|
---|
89 | IO_RCC_IOFAIL,
|
---|
90 | IO_PCI_TABLEFULL,
|
---|
91 | IO_PCI_NOT_FOUND,
|
---|
92 | IO_PCI_ILL_HANDLE,
|
---|
93 | IO_PCI_UNKNOWN_BOARD,
|
---|
94 | IO_PCI_CONFIGRW,
|
---|
95 | IO_PCI_REMAP,
|
---|
96 | IO_RCC_ILL_OFFSET,
|
---|
97 | IO_RCC_NO_CODE
|
---|
98 | };
|
---|
99 |
|
---|
100 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.