StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
bdbLib.h
1 #ifndef _BDB_LIB_H_
2 #define _BDB_LIB_H_
3 
4 #include <vxWorks.h>
5 
6 #define BDB_MAX_NUM 21
7 
8 #define BDB_MASK_REG 0x00
9 #define BDB_STAT_REG 0x02
10 
11 // mask register
12 #define BDB_OVERRIDE_BUSY_BIT 15
13 
14 // status register
15 #define BDB_BUSY_BIT 15
16 #define BDB_MANUAL_STATE_BIT 14
17 
18 #define BDB_MASK_ALL_ENABLE 0x0
19 #define BDB_MASK_ALL_DISABLE 0x1FFF
20 
21 // VME A16 addresses in the Main Crate
22 #define BDB_TPC_0 0x0000
23 #define BDB_TPC_1 0x0100
24 #define BDB_SVT 0x0200
25 #define BDB_FTPC 0x0300
26 // VME A16 address in the Sector Crate
27 #define BDB_SECTOR 0x0000
28 
29 
30 extern int bdbFind(UINT16 a16) ;
31 extern int bdbInit(int bdb) ;
32 
33 extern int bdbSetMask(int bdb, UINT16 mask) ;
34 extern UINT16 bdbGetMask(int bdb) ;
35 
36 extern int bdbSetBusy(int bdb) ;
37 extern int bdbClearBusy(int bdb) ;
38 extern int bdbGetBusy(int bdb) ;
39 
40 extern int bdbGetRBBusy(int bdb, int rb) ;
41 
42 extern int bdbSetRBMask(int bdb, int rb) ;
43 extern int bdbClearRBMask(int bdb, int rb) ;
44 extern int bdbGetRBMask(int bdb, int rb) ;
45 
46 extern UINT32 *bdbTable ;
47 
48 
49 
50 
51 
52 
53 #endif // _BDB_LIB_H_
Definition: rb.hh:21