JLab VME Pipeline TI Library  3v11.3
JLab VME Pipeline TI library
 All Classes Functions Variables Groups
vxCompat.h
1 /************************************************************
2  * vxCompat.h - Header for compatibility routines
3  *
4  * - Routines to help with compatibility with Linux
5  * libraries
6  *
7  */
8 
9 #ifndef __VXCOMPAT_H__
10 #define __VXCOMPAT_H__
11 
12 /* Register Read/Write routines */
13 unsigned char
14 vmeRead8(volatile unsigned char *addr)
15 {
16  unsigned char rval;
17 
18  rval = *addr;
19 
20  return rval;
21 }
22 
23 unsigned short
24 vmeRead16(volatile unsigned short *addr)
25 {
26  unsigned short rval;
27 
28  rval = *addr;
29 
30  return rval;
31 }
32 
33 unsigned int
34 vmeRead32(volatile unsigned int *addr)
35 {
36  unsigned int rval;
37 
38  rval = *addr;
39 
40  return rval;
41 }
42 
43 void
44 vmeWrite8(volatile unsigned char *addr, unsigned char val)
45 {
46 
47  *addr = val;
48 
49  return;
50 }
51 
52 void
53 vmeWrite16(volatile unsigned short *addr, unsigned short val)
54 {
55 
56  *addr = val;
57 
58  return;
59 }
60 
61 void
62 vmeWrite32(volatile unsigned int *addr, unsigned int val)
63 {
64 
65  *addr = val;
66 
67  return;
68 }
69 
70 #endif /* __VXCOMPAT_H__ */