Rev 76 | Rev 100 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
76 | f9daq | 1 | #ifndef _VME_H_ |
2 | #define _VME_H_ |
||
3 | |||
4 | #include <stdint.h> |
||
5 | |||
6 | #define CAEN_V1718 0 |
||
7 | #define WIENER_VMEMM 1 |
||
8 | #define WIENER_VMUSB 2 |
||
9 | |||
10 | |||
11 | short VME_START( int interface ); |
||
87 | f9daq | 12 | int VME_GetInterface(); |
76 | f9daq | 13 | short VME_STOP(); |
14 | int VME_CONNECTED(); |
||
15 | |||
16 | #define VME_A16 0x29 |
||
17 | #define VME_A24 0x39 |
||
18 | #define VME_A32 0x9 |
||
19 | |||
20 | #define VME_D8 0x1 |
||
21 | #define VME_D16 0x2 |
||
22 | #define VME_D32 0x4 |
||
23 | |||
24 | #define VME_A16D8_R(VME,DATA) VME_R( VME_A16, VME_D8 , (VME), (DATA) ) |
||
25 | #define VME_A16D16_R(VME,DATA) VME_R( VME_A16, VME_D16 , (VME), (DATA) ) |
||
26 | #define VME_A16D32_R(VME,DATA) VME_R( VME_A16, VME_D32 , (VME), (DATA) ) |
||
27 | |||
28 | #define VME_A24D8_R(VME,DATA) VME_R( VME_A24, VME_D8 , (VME), (DATA) ) |
||
29 | #define VME_A24D16_R(VME,DATA) VME_R( VME_A24, VME_D16 , (VME), (DATA) ) |
||
30 | #define VME_A24D32_R(VME,DATA) VME_R( VME_A24, VME_D32 , (VME), (DATA) ) |
||
31 | |||
32 | #define VME_A32D8_R(VME,DATA) VME_R( VME_A32, VME_D8 , (VME), (DATA) ) |
||
33 | #define VME_A32D16_R(VME,DATA) VME_R( VME_A32, VME_D16 , (VME), (DATA) ) |
||
34 | #define VME_A32D32_R(VME,DATA) VME_R( VME_A32, VME_D32 , (VME), (DATA) ) |
||
35 | |||
36 | #define VME_A16D8_W(VME,DATA) VME_W( VME_A16, VME_D8 , (VME), (DATA) ) |
||
37 | #define VME_A16D16_W(VME,DATA) VME_W( VME_A16, VME_D16 , (VME), (DATA) ) |
||
38 | #define VME_A16D32_W(VME,DATA) VME_W( VME_A16, VME_D32 , (VME), (DATA) ) |
||
39 | |||
40 | #define VME_A24D8_W(VME,DATA) VME_W( VME_A24, VME_D8 , (VME), (DATA) ) |
||
41 | #define VME_A24D16_W(VME,DATA) VME_W( VME_A24, VME_D16 , (VME), (DATA) ) |
||
42 | #define VME_A24D32_W(VME,DATA) VME_W( VME_A24, VME_D32 , (VME), (DATA) ) |
||
43 | |||
44 | #define VME_A32D8_W(VME,DATA) VME_W( VME_A32, VME_D8 , (VME), (DATA) ) |
||
45 | #define VME_A32D16_W(VME,DATA) VME_W( VME_A32, VME_D16 , (VME), (DATA) ) |
||
46 | #define VME_A32D32_W(VME,DATA) VME_W( VME_A32, VME_D32 , (VME), (DATA) ) |
||
47 | |||
48 | |||
49 | #define VME_R (*VME_R_Ptr) |
||
50 | #define VME_W (*VME_W_Ptr) |
||
51 | #define VME_MW (*VME_MW_Ptr) |
||
52 | #define VME_MWRST (*VME_MWRST_Ptr) |
||
53 | #define VME_MWEXEC (*VME_MWEXEC_Ptr) |
||
54 | |||
55 | #define VME_MR (*VME_MR_Ptr) |
||
56 | #define VME_MRRST (*VME_MRRST_Ptr) |
||
57 | #define VME_MREXEC (*VME_MREXEC_Ptr) |
||
58 | |||
59 | |||
60 | short __stdcall VME_R( uint16_t AM, uint16_t DW, uint32_t VME_Address, uint32_t *Data); |
||
61 | |||
62 | short __stdcall VME_W( uint16_t AM, uint16_t DW, uint32_t VME_Address, uint32_t Data); |
||
63 | |||
64 | short __stdcall VME_MW( uint16_t AM, uint16_t DW, uint32_t VME_Address, uint32_t Data); |
||
65 | short __stdcall VME_MWRST( void ); |
||
66 | short __stdcall VME_MWEXEC( void ); |
||
67 | |||
68 | short __stdcall VME_MR( uint16_t AM, uint16_t DW, uint32_t VME_Address, uint32_t *Data); |
||
69 | short __stdcall VME_MRRST( void ); |
||
70 | short __stdcall VME_MREXEC( uint32_t *Data ); |
||
71 | |||
72 | #endif |
||
73 |