Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
77 | f9daq | 1 | #ifndef _CAEN_V1718_H |
2 | #define _CAEN_V1718_H |
||
3 | |||
4 | #include <CAENVMElib.h> |
||
5 | |||
6 | extern int32_t CAEN_udev; |
||
7 | |||
8 | |||
9 | |||
10 | int CAEN_VME_start (char*); |
||
11 | int CAEN_VME_close (int); |
||
12 | int CAEN_VME_stop (void); |
||
13 | int CAEN_VME_reset (void); |
||
14 | |||
15 | short __stdcall CAEN_VME_R( uint16_t AM, uint16_t DW, uint32_t VME_Address, uint32_t *Data); |
||
16 | |||
17 | short __stdcall CAEN_VME_W( uint16_t AM, uint16_t DW, uint32_t VME_Address, uint32_t Data); |
||
18 | |||
19 | short __stdcall CAEN_VME_MW( uint16_t AM, uint16_t DW, uint32_t VME_Address, uint32_t Data); |
||
20 | short __stdcall CAEN_VME_MWRST( void ); |
||
21 | short __stdcall CAEN_VME_MWEXEC( void ); |
||
22 | |||
23 | short __stdcall CAEN_VME_MR( uint16_t AM, uint16_t DW, uint32_t VME_Address, uint32_t *Data); |
||
24 | short __stdcall CAEN_VME_MRRST( void ); |
||
25 | short __stdcall CAEN_VME_MREXEC( uint32_t *Data ); |
||
26 | |||
27 | |||
28 | |||
29 | int CAEN_VME_BltRead(long Handle, unsigned long Address, void *Data,int size, CVAddressModifier AM, CVDataWidth DW); |
||
30 | |||
31 | |||
32 | short CAEN_VME_read(long Handle, unsigned long Address, void *Data, CVAddressModifier AM, CVDataWidth DW); |
||
33 | short CAEN_VME_write(long Handle, unsigned long Address, void *Data, CVAddressModifier AM, CVDataWidth DW); |
||
34 | |||
35 | short CAEN_VME_appendread(unsigned long Address, void *Data, CVAddressModifier AM, CVDataWidth DW); |
||
36 | short CAEN_VME_appendwrite(unsigned long Address, void *Data, CVAddressModifier AM, CVDataWidth DW); |
||
37 | |||
38 | short CAEN_VME_MultiReadReset( void); |
||
39 | short CAEN_VME_MultiWriteReset( void); |
||
40 | short CAEN_VME_MultiReadExecute(long Handle, uint32_t *Data); |
||
41 | short CAEN_VME_MultiWriteExecute(long Handle); |
||
42 | |||
43 | #define CAEN_VME_START(NODE) CAEN_VME_start((NODE)) |
||
44 | #define CAEN_VME_STOP() CAENVME_End(CAEN_udev) |
||
45 | #define CAEN_VME_RESET() CAENVME_SystemReset(CAEN_udev) |
||
46 | |||
47 | #define CAEN_VME_A16D8_R(VME,DATA) CAEN_VME_read( CAEN_udev, (VME), (DATA) , cvA16_U_DATA, cvD8) |
||
48 | #define CAEN_VME_A16D16_R(VME,DATA) CAEN_VME_read( CAEN_udev, (VME), (DATA) , cvA16_U_DATA, cvD16) |
||
49 | #define CAEN_VME_A16D32_R(VME,DATA) CAEN_VME_read( CAEN_udev, (VME), (DATA) , cvA16_U_DATA, cvD32) |
||
50 | |||
51 | #define CAEN_VME_A24D8_R(VME,DATA) CAEN_VME_read( CAEN_udev, (VME), (DATA) , cvA24_U_DATA, cvD8) |
||
52 | #define CAEN_VME_A24D16_R(VME,DATA) CAEN_VME_read( CAEN_udev, (VME), (DATA) , cvA24_U_DATA, cvD16) |
||
53 | #define CAEN_VME_A24D32_R(VME,DATA) CAEN_VME_read( CAEN_udev, (VME), (DATA) , cvA24_U_DATA, cvD32) |
||
54 | |||
55 | #define CAEN_VME_A32D8_R(VME,DATA) CAEN_VME_read( CAEN_udev, (VME), (DATA) , cvA32_U_DATA, cvD8) |
||
56 | #define CAEN_VME_A32D16_R(VME,DATA) CAEN_VME_read( CAEN_udev, (VME), (DATA) , cvA32_U_DATA, cvD16) |
||
57 | #define CAEN_VME_A32D32_R(VME,DATA) CAEN_VME_read( CAEN_udev, (VME), (DATA) , cvA32_U_DATA, cvD32) |
||
58 | |||
59 | #define CAEN_VME_A16D8_W(VME,DATA) CAEN_VME_write( CAEN_udev, (VME), (DATA) , cvA16_U_DATA, cvD8) |
||
60 | #define CAEN_VME_A16D16_W(VME,DATA) CAEN_VME_write( CAEN_udev, (VME), (DATA) , cvA16_U_DATA, cvD16) |
||
61 | #define CAEN_VME_A16D32_W(VME,DATA) CAEN_VME_write( CAEN_udev, (VME), (DATA) , cvA16_U_DATA, cvD32) |
||
62 | |||
63 | #define CAEN_VME_A24D8_W(VME,DATA) CAEN_VME_write( CAEN_udev, (VME), (DATA) , cvA24_U_DATA, cvD8) |
||
64 | #define CAEN_VME_A24D16_W(VME,DATA) CAEN_VME_write( CAEN_udev, (VME), (DATA) , cvA24_U_DATA, cvD16) |
||
65 | #define CAEN_VME_A24D32_W(VME,DATA) CAEN_VME_write( CAEN_udev, (VME), (DATA) , cvA24_U_DATA, cvD32) |
||
66 | |||
67 | #define CAEN_VME_A32D8_W(VME,DATA) CAEN_VME_write( CAEN_udev, (VME), (DATA) , cvA32_U_DATA, cvD8) |
||
68 | #define CAEN_VME_A32D16_W(VME,DATA) CAEN_VME_write( CAEN_udev, (VME), (DATA) , cvA32_U_DATA, cvD16) |
||
69 | #define CAEN_VME_A32D32_W(VME,DATA) CAEN_VME_write( CAEN_udev, (VME), (DATA) , cvA32_U_DATA, cvD32) |
||
70 | |||
71 | |||
72 | |||
73 | #define CAEN_VME_A16D8_MR(VME,DATA) CAEN_VME_appendread( (VME), (DATA) , cvA16_U_DATA, cvD8) |
||
74 | #define CAEN_VME_A16D16_MR(VME,DATA) CAEN_VME_appendread( (VME), (DATA) , cvA16_U_DATA, cvD16) |
||
75 | #define CAEN_VME_A16D32_MR(VME,DATA) CAEN_VME_appendread( (VME), (DATA) , cvA16_U_DATA, cvD32) |
||
76 | |||
77 | #define CAEN_VME_A24D8_MR(VME,DATA) CAEN_VME_appendread( (VME), (DATA) , cvA24_U_DATA, cvD8) |
||
78 | #define CAEN_VME_A24D16_MR(VME,DATA) CAEN_VME_appendread( (VME), (DATA) , cvA24_U_DATA, cvD16) |
||
79 | #define CAEN_VME_A24D32_MR(VME,DATA) CAEN_VME_appendread( (VME), (DATA) , cvA24_U_DATA, cvD32) |
||
80 | |||
81 | #define CAEN_VME_A32D8_MR(VME,DATA) CAEN_VME_appendread( (VME), (DATA) , cvA32_U_DATA, cvD8) |
||
82 | #define CAEN_VME_A32D16_MR(VME,DATA) CAEN_VME_appendread( (VME), (DATA) , cvA32_U_DATA, cvD16) |
||
83 | #define CAEN_VME_A32D32_MR(VME,DATA) CAEN_VME_appendread( (VME), (DATA) , cvA32_U_DATA, cvD32) |
||
84 | |||
85 | #define CAEN_VME_A16D8_MW(VME,DATA) CAEN_VME_appendwrite( (VME), (DATA) , cvA16_U_DATA, cvD8) |
||
86 | #define CAEN_VME_A16D16_MW(VME,DATA) CAEN_VME_appendwrite( (VME), (DATA) , cvA16_U_DATA, cvD16) |
||
87 | #define CAEN_VME_A16D32_MW(VME,DATA) CAEN_VME_appendwrite( (VME), (DATA) , cvA16_U_DATA, cvD32) |
||
88 | |||
89 | #define CAEN_VMEA24D8_MW(VME,DATA) CAEN_VMEappendwrite( (VME), (DATA) , cvA24_U_DATA, cvD8) |
||
90 | #define CAEN_VMEA24D16_MW(VME,DATA) CAEN_VMEappendwrite( (VME), (DATA) , cvA24_U_DATA, cvD16) |
||
91 | #define CAEN_VMEA24D32_MW(VME,DATA) CAEN_VMEappendwrite( (VME), (DATA) , cvA24_U_DATA, cvD32) |
||
92 | |||
93 | #define CAEN_VMEA32D8_MW(VME,DATA) CAEN_VMEappendwrite( (VME), (DATA) , cvA32_U_DATA, cvD8) |
||
94 | #define CAEN_VMEA32D16_MW(VME,DATA) CAEN_VMEappendwrite( (VME), (DATA) , cvA32_U_DATA, cvD16) |
||
95 | #define CAEN_VMEA32D32_MW(VME,DATA) CAEN_VMEappendwrite( (VME), (DATA) , cvA32_U_DATA, cvD32) |
||
96 | |||
97 | #define CAEN_VMEMWRST() CAEN_VMEMultiWriteReset() |
||
98 | #define CAEN_VMEMWEXEC() CAEN_VMEMultiWriteExecute(CAEN_udev) |
||
99 | #define CAEN_VMEMRRST() CAEN_VMEMultiReadReset() |
||
100 | #define CAEN_VMEMREXEC(DATA) CAEN_VMEMultiReadExecute(CAEN_udev, (DATA) ) |
||
101 | |||
102 | #define CAEN_VMEA32D16BLT_R(VME,DATA,SIZE) CAEN_VMEBltRead( CAEN_udev, (VME), (DATA) , (SIZE) , cvA32_U_BLT, cvD16) |
||
103 | #define CAEN_VMEA24D16BLT_R(VME,DATA,SIZE) CAEN_VMEBltRead( CAEN_udev, (VME), (DATA) , (SIZE) , cvA24_U_BLT, cvD16) |
||
104 | |||
105 | #define CAEN_VMEA32D32BLT_R(VME,DATA,SIZE) CAEN_VMEBltRead( CAEN_udev, (VME), (DATA) , (SIZE) , cvA32_U_BLT, cvD32) |
||
106 | #define CAEN_VMEA24D32BLT_R(VME,DATA,SIZE) CAEN_VMEBltRead( CAEN_udev, (VME), (DATA) , (SIZE) , cvA24_U_DATA, cvD32) |
||
107 | |||
108 | #define CAEN_VMEA24D32BLT_READ(VME,DATA,SIZE,COUNT) CAENVME_BLTReadCycle(CAEN_udev, (VME), (DATA), (SIZE), cvA24_U_BLT, cvD32 , (COUNT) ) |
||
109 | |||
110 | |||
111 | #endif |