StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
rorc.h
1 #ifndef _RORC_H_
2 #define _RORC_H_
3 
4 /*
5  ***************************************************
6  * rorc.h
7  *
8  * Header file for pRORC and D-RORC cards
9  *
10  * last updated: 17/04/2007
11  * written by: Ervin Denes
12  ***************************************************
13  */
14 
15 #define DEV_RORC "/dev/prorc"
16 #define LOCK_DIR "/dev/prorc/"
17 #define MAX_DEVICE 16
18 #define MAX_CHANNEL 2
19 #define MAX_DDG 12
20 
21 /*
22  * Ioctls ******************************************
23  */
24 
25 #define RORCMAGIC 0xdc
26 /*
27  * get number of RORC's
28  */
29 
30 #define RORC_COUNT _IO(RORCMAGIC, 0)
31 
32 /*
33  * read PCI configuration infos
34  */
35 
36 #define RORC_R_VENDOR _IO(RORCMAGIC, 10) /* get pci info */
37 #define RORC_R_DEVICE _IO(RORCMAGIC, 11) /* get pci info */
38 #define RORC_R_IRQ _IO(RORCMAGIC, 12) /* get pci info */
39 #define RORC_R_REVISION _IO(RORCMAGIC, 13) /* pRORC or D-RORC */
40 #define RORC_R_BAR0 _IO(RORCMAGIC, 14) /* get pci info */
41 #define RORC_R_BAR1 _IO(RORCMAGIC, 15) /* get pci info */
42 #define RORC_R_ROM _IO(RORCMAGIC, 16) /* get pci info */
43 #define RORC_R_PCI_CFG _IO(RORCMAGIC, 19) /* get pci info */
44 
45 /* pRORC ---------------------------------------------------------*/
46 
47 /*
48  * reset functions
49  */
50 
51 #define PRORC_RESET _IO(RORCMAGIC, 20) /* reset pRORC */
52 #define PRORC_FF_RESET _IO(RORCMAGIC, 21) /* reset FIFO */
53 #define PRORC_MB_RESET _IO(RORCMAGIC, 22) /* reset mailbox flags */
54 #define PRORC_SET_WTE _IO(RORCMAGIC, 23) /* set write transfer enable */
55 #define PRORC_SET_WMS _IO(RORCMAGIC, 24) /* set write management scheme */
56 #define PRORC_SET_WVR _IO(RORCMAGIC, 25) /* set write versus read priority */
57 #define PRORC_SET_RTE _IO(RORCMAGIC, 26) /* set read transfer enable */
58 #define PRORC_SET_RMS _IO(RORCMAGIC, 27) /* set read management scheme */
59 #define PRORC_SET_RVW _IO(RORCMAGIC, 28) /* set read versus write priority */
60 
61 /* Driver version-------------------------------------------------*/
62 
63 #define RORC_R_DR_MAJ _IO(RORCMAGIC, 30) /* get RORC driver version major */
64 #define RORC_R_DR_MIN _IO(RORCMAGIC, 31) /* get RORC driver version minor */
65 #define RORC_R_DR_REL _IO(RORCMAGIC, 32) /* get RORC driver version release */
66 
67 /*
68  * channel usage
69  */
70 
71 #define RORC_R_CHAN _IO(RORCMAGIC, 40) /* check if channel is used */
72 #define RORC_SET_CHAN _IO(RORCMAGIC, 41) /* set channel used */
73 #define RORC_RES_CHAN _IO(RORCMAGIC, 42) /* set channel free */
74 
75 /*
76  * serial number
77  */
78 
79 #define RORC_R_SERIAL _IO(RORCMAGIC, 50) /* read serial number */
80 
81 #endif /* _RORC_H */