Rev 134 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 134 | Rev 170 | ||
---|---|---|---|
Line 22... | Line 22... | ||
22 | */ |
22 | */ |
23 | 23 | ||
24 | #include "CAENV1718.h" |
24 | #include "CAENV1718.h" |
25 | #include "wusbvme_dll.h" |
25 | #include "wusbvme_dll.h" |
26 | #include "wienvme_dll.h" |
26 | #include "wienvme_dll.h" |
- | 27 | #include "sis3153.h" |
|
27 | 28 | ||
28 | static int VME_interface= -1; |
29 | static int VME_interface= -1; |
29 | int VME_GetInterface() { |
30 | int VME_GetInterface() { |
30 | return VME_interface; |
31 | return VME_interface; |
31 | } |
32 | } |
32 | int VME_CONNECTED() { |
33 | int VME_CONNECTED() { |
33 | - | ||
34 | return VME_interface; |
34 | return VME_interface; |
35 | } |
35 | } |
36 | 36 | ||
37 | short VME_START (int interface) { |
37 | short VME_START (int interface) { |
38 | //short __stdcall VME_START (int interface) { |
38 | //short __stdcall VME_START (int interface) { |
Line 70... | Line 70... | ||
70 | VME_MW_Ptr = WIENVME_VME_MW; |
70 | VME_MW_Ptr = WIENVME_VME_MW; |
71 | VME_MR_Ptr = WIENVME_VME_MR; |
71 | VME_MR_Ptr = WIENVME_VME_MR; |
72 | 72 | ||
73 | VME_MWEXEC_Ptr = WIENVME_VME_MWEXEC; |
73 | VME_MWEXEC_Ptr = WIENVME_VME_MWEXEC; |
74 | VME_MREXEC_Ptr = WIENVME_VME_MREXEC; |
74 | VME_MREXEC_Ptr = WIENVME_VME_MREXEC; |
75 | 75 | ||
76 | VME_MWRST_Ptr = WIENVME_VME_MWRST; |
76 | VME_MWRST_Ptr = WIENVME_VME_MWRST; |
77 | VME_MRRST_Ptr = WIENVME_VME_MRRST; |
77 | VME_MRRST_Ptr = WIENVME_VME_MRRST; |
78 | break; |
78 | break; |
- | 79 | ||
79 | case WIENER_VMUSB: |
80 | case WIENER_VMUSB: |
80 | WIENER_VMUSB_VME_START("VM0120"); |
81 | WIENER_VMUSB_VME_START("VM0120"); |
81 | VME_R_Ptr = WIENER_VMUSB_VME_R; |
82 | VME_R_Ptr = WIENER_VMUSB_VME_R; |
82 | VME_W_Ptr = WIENER_VMUSB_VME_W; |
83 | VME_W_Ptr = WIENER_VMUSB_VME_W; |
83 | 84 | ||
84 | VME_MW_Ptr = WIENER_VMUSB_VME_MW; |
85 | VME_MW_Ptr = WIENER_VMUSB_VME_MW; |
85 | VME_MR_Ptr = WIENER_VMUSB_VME_MR; |
86 | VME_MR_Ptr = WIENER_VMUSB_VME_MR; |
86 | 87 | ||
87 | VME_MW_Ptr = WIENER_VMUSB_VME_MW; |
88 | VME_MW_Ptr = WIENER_VMUSB_VME_MW; |
88 | VME_MR_Ptr = WIENER_VMUSB_VME_MR; |
89 | VME_MR_Ptr = WIENER_VMUSB_VME_MR; |
89 | 90 | ||
90 | VME_MWEXEC_Ptr = WIENER_VMUSB_VME_MWEXEC; |
91 | VME_MWEXEC_Ptr = WIENER_VMUSB_VME_MWEXEC; |
91 | VME_MREXEC_Ptr = WIENER_VMUSB_VME_MREXEC; |
92 | VME_MREXEC_Ptr = WIENER_VMUSB_VME_MREXEC; |
92 | 93 | ||
93 | VME_MWRST_Ptr = WIENER_VMUSB_VME_MWRST; |
94 | VME_MWRST_Ptr = WIENER_VMUSB_VME_MWRST; |
94 | VME_MRRST_Ptr = WIENER_VMUSB_VME_MRRST; |
95 | VME_MRRST_Ptr = WIENER_VMUSB_VME_MRRST; |
95 | break; |
96 | break; |
96 | 97 | ||
- | 98 | case SIS3153_USB: |
|
- | 99 | SIS3153_USB_VME_START(NULL); |
|
- | 100 | VME_R_Ptr = SIS3153_USB_VME_R; |
|
- | 101 | VME_W_Ptr = SIS3153_USB_VME_W; |
|
97 | } |
102 | |
- | 103 | VME_MWRST_Ptr = SIS3153_USB_VME_MWRST; |
|
- | 104 | VME_MW_Ptr = SIS3153_USB_VME_MW; |
|
- | 105 | VME_MWEXEC_Ptr = SIS3153_USB_VME_MWEXEC; |
|
98 | 106 | ||
- | 107 | VME_MRRST_Ptr = SIS3153_USB_VME_MRRST; |
|
- | 108 | VME_MR_Ptr = SIS3153_USB_VME_MR; |
|
- | 109 | VME_MREXEC_Ptr = SIS3153_USB_VME_MREXEC; |
|
- | 110 | break; |
|
- | 111 | default: |
|
- | 112 | break; |
|
- | 113 | } |
|
99 | return 0; |
114 | return 0; |
100 | } |
115 | } |
- | 116 | ||
101 | short VME_STOP () { |
117 | short VME_STOP () { |
102 | //short __stdcall VME_STOP () { |
118 | //short __stdcall VME_STOP () { |
103 | switch (VME_interface) { |
119 | switch (VME_interface) { |
104 | case CAEN_V1718: |
120 | case CAEN_V1718: |
105 | - | ||
106 | CAEN_VME_STOP( |
121 | CAEN_VME_STOP(); |
107 | break; |
122 | break; |
108 | - | ||
109 | case WIENER_VMEMM: |
123 | case WIENER_VMEMM: |
110 | - | ||
111 | break; |
124 | break; |
112 | case WIENER_VMUSB: |
125 | case WIENER_VMUSB: |
113 | WIENER_VMUSB_VME_STOP( |
126 | WIENER_VMUSB_VME_STOP(); |
- | 127 | break; |
|
- | 128 | case SIS3153_USB: |
|
- | 129 | SIS3153_USB_VME_STOP(); |
|
114 | break; |
130 | break; |
115 | default: |
131 | default: |
116 | - | ||
117 | break; |
132 | break; |
118 | - | ||
119 | } |
133 | } |
120 | - | ||
121 | VME_interface = -1; |
134 | VME_interface = -1; |
122 | return 0; |
135 | return 0; |
123 | } |
136 | } |