Subversion Repositories f9daq

Rev

Rev 52 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 52 Rev 83
1
/*!
1
/*!
2
        -----------------------------------------------------------------------------
2
        -----------------------------------------------------------------------------
3
 
3
 
4
                       --- CAEN SpA - Computing Systems Division ---
4
                       --- CAEN SpA - Computing Systems Division ---
5
 
5
 
6
        -----------------------------------------------------------------------------
6
        -----------------------------------------------------------------------------
7
 
7
 
8
        CAENVMElib.h
8
        CAENVMElib.h
9
 
9
 
10
        -----------------------------------------------------------------------------
10
        -----------------------------------------------------------------------------
11
 
11
 
12
        Created: March 2004
12
        Created: March 2004
13
 
13
 
14
        -----------------------------------------------------------------------------
14
        -----------------------------------------------------------------------------
15
*/
15
*/
16
#ifndef __CAENVMELIB_H
16
#ifndef __CAENVMELIB_H
17
#define __CAENVMELIB_H
17
#define __CAENVMELIB_H
18
 
18
 
19
#include <stdio.h>
19
#include <stdio.h>
20
// Rev. 2.5
20
// Rev. 2.5
21
#ifdef LINUX
21
#ifdef LINUX
22
        #include <stdint.h>
22
        #include <stdint.h>
23
#endif
23
#endif
24
#include <stdlib.h>
24
#include <stdlib.h>
25
#ifndef _CVI_
25
#ifndef _CVI_
26
#include <malloc.h>
26
#include <malloc.h>
27
#endif
27
#endif
28
#include "CAENVMEoslib.h"
28
#include "CAENVMEoslib.h"
29
#include "CAENVMEtypes.h"
29
#include "CAENVMEtypes.h"
30
 
30
 
31
#ifdef WIN32
31
#ifdef WIN32
32
#ifdef  _CVI_ 
32
#ifndef  _CVI_ 
33
        typedef char   int8_t;
-
 
34
        typedef unsigned char  uint8_t;
-
 
35
        typedef short  int16_t;
-
 
36
        typedef unsigned short uint16_t;
-
 
37
        typedef int  int32_t;
-
 
38
        typedef unsigned int  uint32_t;
-
 
39
//      typedef INT64  int64_t;
-
 
40
//      typedef UINT64 uint64_t;
-
 
41
#else
33
 
42
        typedef INT8   int8_t;
34
        typedef INT8   int8_t;
43
        typedef UINT8  uint8_t;
35
        typedef UINT8  uint8_t;
44
        typedef INT16  int16_t;
36
        typedef INT16  int16_t;
45
        typedef UINT16 uint16_t;
37
        typedef UINT16 uint16_t;
46
        typedef INT32  int32_t;
38
        typedef INT32  int32_t;
47
        typedef UINT32 uint32_t;
39
        typedef UINT32 uint32_t;
48
        typedef INT64  int64_t;
40
        typedef INT64  int64_t;
49
        typedef UINT64 uint64_t;
41
        typedef UINT64 uint64_t;
50
#endif
42
#endif
51
#endif
43
#endif
52
 
44
 
53
#ifdef __cplusplus
45
#ifdef __cplusplus
54
extern "C" {
46
extern "C" {
55
#endif // __cplusplus
47
#endif // __cplusplus
56
/*
48
/*
57
        CAENVME_DecodeError
49
        CAENVME_DecodeError
58
        -----------------------------------------------------------------------------
50
        -----------------------------------------------------------------------------
59
        Parameters:
51
        Parameters:
60
                [in]  Code      : The error code to decode.
52
                [in]  Code      : The error code to decode.
61
        -----------------------------------------------------------------------------
53
        -----------------------------------------------------------------------------
62
        Returns:
54
        Returns:
63
                An string describing the error condition.
55
                An string describing the error condition.
64
        -----------------------------------------------------------------------------
56
        -----------------------------------------------------------------------------
65
        Description:
57
        Description:
66
                Decode the error.
58
                Decode the error.
67
*/
59
*/
68
const char *
60
const char *
69
#ifdef WIN32
61
#ifdef WIN32
70
__stdcall
62
__stdcall
71
#endif
63
#endif
72
CAENVME_DecodeError(CVErrorCodes Code);
64
CAENVME_DecodeError(CVErrorCodes Code);
73
 
65
 
74
/*
66
/*
75
        CAENVME_API CAENVME_SWRelease
67
        CAENVME_API CAENVME_SWRelease
76
        -----------------------------------------------------------------------------
68
        -----------------------------------------------------------------------------
77
        Parameters:
69
        Parameters:
78
                [out] SwRel     : Returns the software release of the library.
70
                [out] SwRel     : Returns the software release of the library.
79
        -----------------------------------------------------------------------------
71
        -----------------------------------------------------------------------------
80
        Returns:
72
        Returns:
81
                An error code about the execution of the function.
73
                An error code about the execution of the function.
82
        -----------------------------------------------------------------------------
74
        -----------------------------------------------------------------------------
83
        Description:
75
        Description:
84
                Permits to read the software release of the library.
76
                Permits to read the software release of the library.
85
*/
77
*/
86
CAENVME_API
78
CAENVME_API
87
CAENVME_SWRelease(char *SwRel);
79
CAENVME_SWRelease(char *SwRel);
88
 
80
 
89
/*
81
/*
90
        CAENVME_BoardFWRelease.
82
        CAENVME_BoardFWRelease.
91
        -----------------------------------------------------------------------------
83
        -----------------------------------------------------------------------------
92
        Parameters:
84
        Parameters:
93
                [in]  Handle    : The handle that identifies the device.
85
                [in]  Handle    : The handle that identifies the device.
94
                [out] FWRel     : Returns the firmware release of the device.
86
                [out] FWRel     : Returns the firmware release of the device.
95
        -----------------------------------------------------------------------------
87
        -----------------------------------------------------------------------------
96
        Returns:
88
        Returns:
97
                An error code about the execution of the function.
89
                An error code about the execution of the function.
98
        -----------------------------------------------------------------------------
90
        -----------------------------------------------------------------------------
99
        Description:
91
        Description:
100
                Permits to read the firmware release loaded into the device.
92
                Permits to read the firmware release loaded into the device.
101
*/
93
*/
102
CAENVME_API
94
CAENVME_API
103
CAENVME_BoardFWRelease(int32_t Handle, char *FWRel);
95
CAENVME_BoardFWRelease(int32_t Handle, char *FWRel);
104
 
96
 
105
/*
97
/*
106
        CAENVME_DriverRelease.
98
        CAENVME_DriverRelease.
107
        -----------------------------------------------------------------------------
99
        -----------------------------------------------------------------------------
108
        Parameters:
100
        Parameters:
109
                [in]  Handle    : The handle that identifies the device.
101
                [in]  Handle    : The handle that identifies the device.
110
                [out] Rel       : Returns the software release of the device driver
102
                [out] Rel       : Returns the software release of the device driver
111
        -----------------------------------------------------------------------------
103
        -----------------------------------------------------------------------------
112
        Returns:
104
        Returns:
113
                An error code about the execution of the function.
105
                An error code about the execution of the function.
114
        -----------------------------------------------------------------------------
106
        -----------------------------------------------------------------------------
115
        Description:
107
        Description:
116
                Permits to read the software release of the device driver.
108
                Permits to read the software release of the device driver.
117
*/
109
*/
118
CAENVME_API
110
CAENVME_API
119
CAENVME_DriverRelease(int32_t Handle, char *Rel);
111
CAENVME_DriverRelease(int32_t Handle, char *Rel);
120
 
112
 
121
/*
113
/*
122
        CAENVME_DeviceReset
114
        CAENVME_DeviceReset
123
        -----------------------------------------------------------------------------
115
        -----------------------------------------------------------------------------
124
        Parameters:
116
        Parameters:
125
                [in]  Handle    : The handle that identifies the device.
117
                [in]  Handle    : The handle that identifies the device.
126
        -----------------------------------------------------------------------------
118
        -----------------------------------------------------------------------------
127
        Returns:
119
        Returns:
128
                An error code about the execution of the function.
120
                An error code about the execution of the function.
129
        -----------------------------------------------------------------------------
121
        -----------------------------------------------------------------------------
130
        Description:
122
        Description:
131
                Permits to reset the device.
123
                Permits to reset the device.
132
                Implemented for A2818, A2719, V2718 on Linux platform only
124
                Implemented for A2818, A2719, V2718 on Linux platform only
133
*/
125
*/
134
CAENVME_API
126
CAENVME_API
135
CAENVME_DeviceReset(int32_t dev);
127
CAENVME_DeviceReset(int32_t dev);
136
 
128
 
137
 
129
 
138
/*
130
/*
139
        CAENVME_Init
131
        CAENVME_Init
140
        -----------------------------------------------------------------------------
132
        -----------------------------------------------------------------------------
141
        Parameters:
133
        Parameters:
142
                [in]  BdType    : The model of the bridge (V1718/V2718).
134
                [in]  BdType    : The model of the bridge (V1718/V2718).
143
                [in]  Link      : The link number (don't care for V1718).
135
                [in]  Link      : The link number (don't care for V1718).
144
                [in]  BdNum     : The board number in the link.
136
                [in]  BdNum     : The board number in the link.
145
                [out] Handle    : The handle that identifies the device.
137
                [out] Handle    : The handle that identifies the device.
146
        -----------------------------------------------------------------------------
138
        -----------------------------------------------------------------------------
147
        Returns:
139
        Returns:
148
                An error code about the execution of the function.
140
                An error code about the execution of the function.
149
        -----------------------------------------------------------------------------
141
        -----------------------------------------------------------------------------
150
        Description:
142
        Description:
151
                The function generates an opaque handle to identify a module
143
                The function generates an opaque handle to identify a module
152
                attached to the PC. In the case of V1718 bridge it must be
144
                attached to the PC. In the case of V1718 bridge it must be
153
                specified only the module index (BdNum) because the link is USB.
145
                specified only the module index (BdNum) because the link is USB.
154
                In the case of V2718 it must be specified also the link because
146
                In the case of V2718 it must be specified also the link because
155
                you can have some A2818 optical link inside the PC.
147
                you can have some A2818 optical link inside the PC.
156
*/
148
*/
157
CAENVME_API
149
CAENVME_API
158
CAENVME_Init(CVBoardTypes BdType, short Link, short BdNum, int32_t *Handle);
150
CAENVME_Init(CVBoardTypes BdType, short Link, short BdNum, int32_t *Handle);
159
 
151
 
160
/*
152
/*
161
        CAENVME_End
153
        CAENVME_End
162
        -----------------------------------------------------------------------------
154
        -----------------------------------------------------------------------------
163
        Parameters:
155
        Parameters:
164
                [in]  Handle    : The handle that identifies the device.
156
                [in]  Handle    : The handle that identifies the device.
165
        -----------------------------------------------------------------------------
157
        -----------------------------------------------------------------------------
166
        Returns:
158
        Returns:
167
                An error code about the execution of the function.
159
                An error code about the execution of the function.
168
        -----------------------------------------------------------------------------
160
        -----------------------------------------------------------------------------
169
        Description:
161
        Description:
170
                Notifies the library the end of work and free the allocated
162
                Notifies the library the end of work and free the allocated
171
                resources.
163
                resources.
172
*/
164
*/
173
CAENVME_API
165
CAENVME_API
174
CAENVME_End(int32_t Handle);
166
CAENVME_End(int32_t Handle);
175
 
167
 
176
/*
168
/*
177
        CAENVME_ReadCycle
169
        CAENVME_ReadCycle
178
        -----------------------------------------------------------------------------
170
        -----------------------------------------------------------------------------
179
        Parameters:
171
        Parameters:
180
                [in]  Handle    : The handle that identifies the device.
172
                [in]  Handle    : The handle that identifies the device.
181
                [in]  Address   : The VME bus address.
173
                [in]  Address   : The VME bus address.
182
                [out] Data      : The data read from the VME bus.
174
                [out] Data      : The data read from the VME bus.
183
                [in]  AM        : The address modifier (see CVAddressModifier enum).
175
                [in]  AM        : The address modifier (see CVAddressModifier enum).
184
                [in]  DW        : The data width.(see CVDataWidth enum).
176
                [in]  DW        : The data width.(see CVDataWidth enum).
185
        -----------------------------------------------------------------------------
177
        -----------------------------------------------------------------------------
186
        Returns:
178
        Returns:
187
                An error code about the execution of the function.
179
                An error code about the execution of the function.
188
        -----------------------------------------------------------------------------
180
        -----------------------------------------------------------------------------
189
        Description:
181
        Description:
190
                The function performs a single VME read cycle.
182
                The function performs a single VME read cycle.
191
*/
183
*/
192
CAENVME_API
184
CAENVME_API
193
CAENVME_ReadCycle(int32_t Handle, uint32_t Address, void *Data,
185
CAENVME_ReadCycle(int32_t Handle, uint32_t Address, void *Data,
194
                  CVAddressModifier AM, CVDataWidth DW);
186
                  CVAddressModifier AM, CVDataWidth DW);
195
 
187
 
196
/*
188
/*
197
        CAENVME_RMWCycle
189
        CAENVME_RMWCycle
198
        -----------------------------------------------------------------------------
190
        -----------------------------------------------------------------------------
199
        Parameters:
191
        Parameters:
200
                [in]     Handle : The handle that identifies the device.
192
                [in]     Handle : The handle that identifies the device.
201
                [in]     Address: The VME bus address.
193
                [in]     Address: The VME bus address.
202
                [in/out] Data   : The data read and then written to the VME bus.
194
                [in/out] Data   : The data read and then written to the VME bus.
203
                [in]     AM     : The address modifier (see CVAddressModifier enum).
195
                [in]     AM     : The address modifier (see CVAddressModifier enum).
204
                [in]     DW     : The data width.(see CVDataWidth enum).
196
                [in]     DW     : The data width.(see CVDataWidth enum).
205
        -----------------------------------------------------------------------------
197
        -----------------------------------------------------------------------------
206
        Returns:
198
        Returns:
207
                An error code about the execution of the function.
199
                An error code about the execution of the function.
208
        -----------------------------------------------------------------------------
200
        -----------------------------------------------------------------------------
209
        Description:
201
        Description:
210
                The function performs a Read-Modify-Write cycle. The Data parameter
202
                The function performs a Read-Modify-Write cycle. The Data parameter
211
                is bidirectional: it is used to write the value to the VME bus and to
203
                is bidirectional: it is used to write the value to the VME bus and to
212
                return the value read.
204
                return the value read.
213
*/
205
*/
214
CAENVME_API
206
CAENVME_API
215
CAENVME_RMWCycle(int32_t Handle, uint32_t Address,  void *Data,
207
CAENVME_RMWCycle(int32_t Handle, uint32_t Address,  void *Data,
216
                 CVAddressModifier AM, CVDataWidth DW);
208
                 CVAddressModifier AM, CVDataWidth DW);
217
 
209
 
218
/*
210
/*
219
        CAENVME_WriteCycle
211
        CAENVME_WriteCycle
220
        -----------------------------------------------------------------------------
212
        -----------------------------------------------------------------------------
221
        Parameters:
213
        Parameters:
222
                [in]  Handle    : The handle that identifies the device.
214
                [in]  Handle    : The handle that identifies the device.
223
                [in]  Address   : The VME bus address.
215
                [in]  Address   : The VME bus address.
224
                [in]  Data      : The data written to the VME bus.
216
                [in]  Data      : The data written to the VME bus.
225
                [in]  AM        : The address modifier (see CVAddressModifier enum).
217
                [in]  AM        : The address modifier (see CVAddressModifier enum).
226
                [in]  DW        : The data width.(see CVDataWidth enum).
218
                [in]  DW        : The data width.(see CVDataWidth enum).
227
        -----------------------------------------------------------------------------
219
        -----------------------------------------------------------------------------
228
        Returns:
220
        Returns:
229
                An error code about the execution of the function.
221
                An error code about the execution of the function.
230
        -----------------------------------------------------------------------------
222
        -----------------------------------------------------------------------------
231
        Description:
223
        Description:
232
                The function performs a single VME write cycle.
224
                The function performs a single VME write cycle.
233
*/
225
*/
234
CAENVME_API
226
CAENVME_API
235
CAENVME_WriteCycle(int32_t Handle, uint32_t Address, void *Data,
227
CAENVME_WriteCycle(int32_t Handle, uint32_t Address, void *Data,
236
                   CVAddressModifier AM, CVDataWidth DW);
228
                   CVAddressModifier AM, CVDataWidth DW);
237
 
229
 
238
/*
230
/*
239
        CAENVME_MultiRead (Ver. 2.2)
231
        CAENVME_MultiRead (Ver. 2.2)
240
        -----------------------------------------------------------------------------
232
        -----------------------------------------------------------------------------
241
        Parameters:
233
        Parameters:
242
                [in]  Handle    : The handle that identifies the device.
234
                [in]  Handle    : The handle that identifies the device.
243
                [in]  Addrs     : The VME bus addresses.
235
                [in]  Addrs     : The VME bus addresses.
244
                [out] Buffer    : The data read from the VME bus.
236
                [out] Buffer    : The data read from the VME bus.
245
                [in]  NCycles   : The number of read cycles to perform.
237
                [in]  NCycles   : The number of read cycles to perform.
246
                [in]  AMs       : The address modifiers (see CVAddressModifier enum).
238
                [in]  AMs       : The address modifiers (see CVAddressModifier enum).
247
                [in]  DWs       : The data widths.(see CVDataWidth enum).
239
                [in]  DWs       : The data widths.(see CVDataWidth enum).
248
                [out] ECs       : The error codes relaive to each cycle.
240
                [out] ECs       : The error codes relaive to each cycle.
249
        -----------------------------------------------------------------------------
241
        -----------------------------------------------------------------------------
250
        Returns:
242
        Returns:
251
                An error code about the execution of the function.
243
                An error code about the execution of the function.
252
        -----------------------------------------------------------------------------
244
        -----------------------------------------------------------------------------
253
        Description:
245
        Description:
254
                The function performs a block of single VME read cycles.
246
                The function performs a block of single VME read cycles.
255
*/
247
*/
256
CAENVME_API
248
CAENVME_API
257
CAENVME_MultiRead(int32_t Handle, uint32_t *Addrs, uint32_t *Buffer,
249
CAENVME_MultiRead(int32_t Handle, uint32_t *Addrs, uint32_t *Buffer,
258
        int NCycles, CVAddressModifier *AMs, CVDataWidth *DWs, CVErrorCodes *ECs);
250
        int NCycles, CVAddressModifier *AMs, CVDataWidth *DWs, CVErrorCodes *ECs);
259
 
251
 
260
/*
252
/*
261
        CAENVME_MultiWrite (Ver. 2.2)
253
        CAENVME_MultiWrite (Ver. 2.2)
262
        -----------------------------------------------------------------------------
254
        -----------------------------------------------------------------------------
263
        Parameters:
255
        Parameters:
264
                [in]  Handle    : The handle that identifies the device.
256
                [in]  Handle    : The handle that identifies the device.
265
                [in]  Addrs     : The VME bus addresses.
257
                [in]  Addrs     : The VME bus addresses.
266
                [in]  Buffer    : The data to write to the VME bus.
258
                [in]  Buffer    : The data to write to the VME bus.
267
                [in]  NCycles   : The number of read cycles to perform.
259
                [in]  NCycles   : The number of read cycles to perform.
268
                [in]  AMs       : The address modifiers (see CVAddressModifier enum).
260
                [in]  AMs       : The address modifiers (see CVAddressModifier enum).
269
                [in]  DWs       : The data widths.(see CVDataWidth enum).
261
                [in]  DWs       : The data widths.(see CVDataWidth enum).
270
                [out] ECs       : The error codes relaive to each cycle.
262
                [out] ECs       : The error codes relaive to each cycle.
271
        -----------------------------------------------------------------------------
263
        -----------------------------------------------------------------------------
272
        Returns:
264
        Returns:
273
                An error code about the execution of the function.
265
                An error code about the execution of the function.
274
        -----------------------------------------------------------------------------
266
        -----------------------------------------------------------------------------
275
        Description:
267
        Description:
276
                The function performs a block of single VME write cycles.
268
                The function performs a block of single VME write cycles.
277
*/
269
*/
278
CAENVME_API
270
CAENVME_API
279
CAENVME_MultiWrite(int32_t Handle, uint32_t *Addrs, uint32_t *Buffer,
271
CAENVME_MultiWrite(int32_t Handle, uint32_t *Addrs, uint32_t *Buffer,
280
        int NCycles, CVAddressModifier *AMs, CVDataWidth *DWs, CVErrorCodes *ECs);
272
        int NCycles, CVAddressModifier *AMs, CVDataWidth *DWs, CVErrorCodes *ECs);
281
 
273
 
282
/*
274
/*
283
        CAENVME_BLTReadCycle
275
        CAENVME_BLTReadCycle
284
        -----------------------------------------------------------------------------
276
        -----------------------------------------------------------------------------
285
        Parameters:
277
        Parameters:
286
                [in]  Handle    : The handle that identifies the device.
278
                [in]  Handle    : The handle that identifies the device.
287
                [in]  Address   : The VME bus address.
279
                [in]  Address   : The VME bus address.
288
                [out] Buffer    : The data read from the VME bus.
280
                [out] Buffer    : The data read from the VME bus.
289
                [in]  Size      : The size of the transfer in bytes.
281
                [in]  Size      : The size of the transfer in bytes.
290
                [in]  AM        : The address modifier (see CVAddressModifier enum).
282
                [in]  AM        : The address modifier (see CVAddressModifier enum).
291
                [in]  DW        : The data width.(see CVDataWidth enum).
283
                [in]  DW        : The data width.(see CVDataWidth enum).
292
                [out] count     : The number of bytes transferred.
284
                [out] count     : The number of bytes transferred.
293
        -----------------------------------------------------------------------------
285
        -----------------------------------------------------------------------------
294
        Returns:
286
        Returns:
295
                An error code about the execution of the function.
287
                An error code about the execution of the function.
296
        -----------------------------------------------------------------------------
288
        -----------------------------------------------------------------------------
297
        Description:
289
        Description:
298
                The function performs a VME block transfer read cycle. It can be used to
290
                The function performs a VME block transfer read cycle. It can be used to
299
                perform MBLT transfers using 64 bit data width.
291
                perform MBLT transfers using 64 bit data width.
300
*/
292
*/
301
CAENVME_API
293
CAENVME_API
302
CAENVME_BLTReadCycle(int32_t Handle, uint32_t Address, void *Buffer,
294
CAENVME_BLTReadCycle(int32_t Handle, uint32_t Address, void *Buffer,
303
                     int Size, CVAddressModifier AM, CVDataWidth DW, int *count);
295
                     int Size, CVAddressModifier AM, CVDataWidth DW, int *count);
304
 
296
 
305
/*
297
/*
306
        Ver. 2.3 - New function
298
        Ver. 2.3 - New function
307
 
299
 
308
        CAENVME_FIFOBLTReadCycle
300
        CAENVME_FIFOBLTReadCycle
309
        -----------------------------------------------------------------------------
301
        -----------------------------------------------------------------------------
310
        Parameters:
302
        Parameters:
311
                [in]  Handle    : The handle that identifies the device.
303
                [in]  Handle    : The handle that identifies the device.
312
                [in]  Address   : The VME bus address.
304
                [in]  Address   : The VME bus address.
313
                [out] Buffer    : The data read from the VME bus.
305
                [out] Buffer    : The data read from the VME bus.
314
                [in]  Size      : The size of the transfer in bytes.
306
                [in]  Size      : The size of the transfer in bytes.
315
                [in]  AM        : The address modifier (see CVAddressModifier enum).
307
                [in]  AM        : The address modifier (see CVAddressModifier enum).
316
                [in]  DW        : The data width.(see CVDataWidth enum).
308
                [in]  DW        : The data width.(see CVDataWidth enum).
317
                [out] count     : The number of bytes transferred.
309
                [out] count     : The number of bytes transferred.
318
        -----------------------------------------------------------------------------
310
        -----------------------------------------------------------------------------
319
        Returns:
311
        Returns:
320
                An error code about the execution of the function.
312
                An error code about the execution of the function.
321
        -----------------------------------------------------------------------------
313
        -----------------------------------------------------------------------------
322
        Description:
314
        Description:
323
                The function performs a VME block transfer read cycle. It can be used to
315
                The function performs a VME block transfer read cycle. It can be used to
324
                perform MBLT transfers using 64 bit data width. The Address is not
316
                perform MBLT transfers using 64 bit data width. The Address is not
325
                incremented on the VMEBus during the cycle.
317
                incremented on the VMEBus during the cycle.
326
*/
318
*/
327
CAENVME_API
319
CAENVME_API
328
CAENVME_FIFOBLTReadCycle(int32_t Handle, uint32_t Address, void *Buffer,
320
CAENVME_FIFOBLTReadCycle(int32_t Handle, uint32_t Address, void *Buffer,
329
                         int Size, CVAddressModifier AM, CVDataWidth DW, int *count);
321
                         int Size, CVAddressModifier AM, CVDataWidth DW, int *count);
330
 
322
 
331
/*
323
/*
332
        CAENVME_MBLTReadCycle
324
        CAENVME_MBLTReadCycle
333
        -----------------------------------------------------------------------------
325
        -----------------------------------------------------------------------------
334
        Parameters:
326
        Parameters:
335
                [in]  Handle    : The handle that identifies the device.
327
                [in]  Handle    : The handle that identifies the device.
336
                [in]  Address   : The VME bus address.
328
                [in]  Address   : The VME bus address.
337
                [out] Buffer    : The data read from the VME bus.
329
                [out] Buffer    : The data read from the VME bus.
338
                [in]  Size      : The size of the transfer in bytes.
330
                [in]  Size      : The size of the transfer in bytes.
339
                [in]  AM        : The address modifier (see CVAddressModifier enum).
331
                [in]  AM        : The address modifier (see CVAddressModifier enum).
340
                [out] count     : The number of bytes transferred.
332
                [out] count     : The number of bytes transferred.
341
        -----------------------------------------------------------------------------
333
        -----------------------------------------------------------------------------
342
        Returns:
334
        Returns:
343
                An error code about the execution of the function.
335
                An error code about the execution of the function.
344
        -----------------------------------------------------------------------------
336
        -----------------------------------------------------------------------------
345
        Description:
337
        Description:
346
                The function performs a VME multiplexed block transfer read cycle.
338
                The function performs a VME multiplexed block transfer read cycle.
347
*/
339
*/
348
CAENVME_API
340
CAENVME_API
349
CAENVME_MBLTReadCycle(int32_t Handle, uint32_t Address, void *Buffer,
341
CAENVME_MBLTReadCycle(int32_t Handle, uint32_t Address, void *Buffer,
350
                      int Size, CVAddressModifier AM, int *count);
342
                      int Size, CVAddressModifier AM, int *count);
351
 
343
 
352
/*
344
/*
353
        Ver. 2.3 - New function
345
        Ver. 2.3 - New function
354
       
346
       
355
        CAENVME_FIFOMBLTReadCycle
347
        CAENVME_FIFOMBLTReadCycle
356
        -----------------------------------------------------------------------------
348
        -----------------------------------------------------------------------------
357
        Parameters:
349
        Parameters:
358
                [in]  Handle    : The handle that identifies the device.
350
                [in]  Handle    : The handle that identifies the device.
359
                [in]  Address   : The VME bus address.
351
                [in]  Address   : The VME bus address.
360
                [out] Buffer    : The data read from the VME bus.
352
                [out] Buffer    : The data read from the VME bus.
361
                [in]  Size      : The size of the transfer in bytes.
353
                [in]  Size      : The size of the transfer in bytes.
362
                [in]  AM        : The address modifier (see CVAddressModifier enum).
354
                [in]  AM        : The address modifier (see CVAddressModifier enum).
363
                [out] count     : The number of bytes transferred.
355
                [out] count     : The number of bytes transferred.
364
        -----------------------------------------------------------------------------
356
        -----------------------------------------------------------------------------
365
        Returns:
357
        Returns:
366
                An error code about the execution of the function.
358
                An error code about the execution of the function.
367
        -----------------------------------------------------------------------------
359
        -----------------------------------------------------------------------------
368
        Description:
360
        Description:
369
                The function performs a VME multiplexed block transfer read cycle.
361
                The function performs a VME multiplexed block transfer read cycle.
370
                The Address is not incremented on the VMEBus during the cycle.
362
                The Address is not incremented on the VMEBus during the cycle.
371
*/
363
*/
372
CAENVME_API
364
CAENVME_API
373
CAENVME_FIFOMBLTReadCycle(int32_t Handle, uint32_t Address, void *Buffer,
365
CAENVME_FIFOMBLTReadCycle(int32_t Handle, uint32_t Address, void *Buffer,
374
                          int Size, CVAddressModifier AM, int *count);
366
                          int Size, CVAddressModifier AM, int *count);
375
 
367
 
376
/*
368
/*
377
        CAENVME_BLTWriteCycle
369
        CAENVME_BLTWriteCycle
378
        -----------------------------------------------------------------------------
370
        -----------------------------------------------------------------------------
379
        Parameters:
371
        Parameters:
380
                [in]  Handle    : The handle that identifies the device.
372
                [in]  Handle    : The handle that identifies the device.
381
                [in]  Address   : The VME bus address.
373
                [in]  Address   : The VME bus address.
382
                [in]  Buffer    : The data to be written to the VME bus.
374
                [in]  Buffer    : The data to be written to the VME bus.
383
                [in]  Size      : The size of the transfer in bytes.
375
                [in]  Size      : The size of the transfer in bytes.
384
                [in]  AM        : The address modifier (see CVAddressModifier enum).
376
                [in]  AM        : The address modifier (see CVAddressModifier enum).
385
                [in]  DW        : The data width.(see CVDataWidth enum).
377
                [in]  DW        : The data width.(see CVDataWidth enum).
386
                [out] count     : The number of bytes transferred.
378
                [out] count     : The number of bytes transferred.
387
        -----------------------------------------------------------------------------
379
        -----------------------------------------------------------------------------
388
        Returns:
380
        Returns:
389
                An error code about the execution of the function.
381
                An error code about the execution of the function.
390
        -----------------------------------------------------------------------------
382
        -----------------------------------------------------------------------------
391
        Description:
383
        Description:
392
                The function performs a VME block transfer write cycle.
384
                The function performs a VME block transfer write cycle.
393
*/
385
*/
394
CAENVME_API
386
CAENVME_API
395
CAENVME_BLTWriteCycle(int32_t Handle, uint32_t Address, void *Buffer,
387
CAENVME_BLTWriteCycle(int32_t Handle, uint32_t Address, void *Buffer,
396
                      int size, CVAddressModifier AM, CVDataWidth DW, int *count);
388
                      int size, CVAddressModifier AM, CVDataWidth DW, int *count);
397
 
389
 
398
/*
390
/*
399
        Ver. 2.3 - New function
391
        Ver. 2.3 - New function
400
 
392
 
401
        CAENVME_FIFOBLTWriteCycle
393
        CAENVME_FIFOBLTWriteCycle
402
        -----------------------------------------------------------------------------
394
        -----------------------------------------------------------------------------
403
        Parameters:
395
        Parameters:
404
                [in]  Handle    : The handle that identifies the device.
396
                [in]  Handle    : The handle that identifies the device.
405
                [in]  Address   : The VME bus address.
397
                [in]  Address   : The VME bus address.
406
                [in]  Buffer    : The data to be written to the VME bus.
398
                [in]  Buffer    : The data to be written to the VME bus.
407
                [in]  Size      : The size of the transfer in bytes.
399
                [in]  Size      : The size of the transfer in bytes.
408
                [in]  AM        : The address modifier (see CVAddressModifier enum).
400
                [in]  AM        : The address modifier (see CVAddressModifier enum).
409
                [in]  DW        : The data width.(see CVDataWidth enum).
401
                [in]  DW        : The data width.(see CVDataWidth enum).
410
                [out] count     : The number of bytes transferred.
402
                [out] count     : The number of bytes transferred.
411
        -----------------------------------------------------------------------------
403
        -----------------------------------------------------------------------------
412
        Returns:
404
        Returns:
413
                An error code about the execution of the function.
405
                An error code about the execution of the function.
414
        -----------------------------------------------------------------------------
406
        -----------------------------------------------------------------------------
415
        Description:
407
        Description:
416
                The function performs a VME block transfer write cycle. The address
408
                The function performs a VME block transfer write cycle. The address
417
                is not incremented during the cycle.
409
                is not incremented during the cycle.
418
*/
410
*/
419
CAENVME_API
411
CAENVME_API
420
CAENVME_FIFOBLTWriteCycle(int32_t Handle, uint32_t Address, void *Buffer,
412
CAENVME_FIFOBLTWriteCycle(int32_t Handle, uint32_t Address, void *Buffer,
421
                      int size, CVAddressModifier AM, CVDataWidth DW, int *count);
413
                      int size, CVAddressModifier AM, CVDataWidth DW, int *count);
422
 
414
 
423
/*
415
/*
424
        CAENVME_MBLTWriteCycle
416
        CAENVME_MBLTWriteCycle
425
        -----------------------------------------------------------------------------
417
        -----------------------------------------------------------------------------
426
        Parameters:
418
        Parameters:
427
                [in]  Handle    : The handle that identifies the device.
419
                [in]  Handle    : The handle that identifies the device.
428
                [in]  Address   : The VME bus address.
420
                [in]  Address   : The VME bus address.
429
                [in]  Buffer    : The data to be written to the VME bus.
421
                [in]  Buffer    : The data to be written to the VME bus.
430
                [in]  Size      : The size of the transfer in bytes.
422
                [in]  Size      : The size of the transfer in bytes.
431
                [in]  AM        : The address modifier (see CVAddressModifier enum).
423
                [in]  AM        : The address modifier (see CVAddressModifier enum).
432
                [out] count     : The number of bytes transferred.
424
                [out] count     : The number of bytes transferred.
433
        -----------------------------------------------------------------------------
425
        -----------------------------------------------------------------------------
434
        Returns:
426
        Returns:
435
                An error code about the execution of the function.
427
                An error code about the execution of the function.
436
        -----------------------------------------------------------------------------
428
        -----------------------------------------------------------------------------
437
        Description:
429
        Description:
438
                The function performs a VME multiplexed block transfer write cycle.
430
                The function performs a VME multiplexed block transfer write cycle.
439
*/
431
*/
440
CAENVME_API
432
CAENVME_API
441
CAENVME_MBLTWriteCycle(int32_t Handle, uint32_t Address, void *Buffer,
433
CAENVME_MBLTWriteCycle(int32_t Handle, uint32_t Address, void *Buffer,
442
                       int size, CVAddressModifier AM, int *count);
434
                       int size, CVAddressModifier AM, int *count);
443
 
435
 
444
/*
436
/*
445
        Ver. 2.3 - New function
437
        Ver. 2.3 - New function
446
       
438
       
447
        CAENVME_FIFOMBLTWriteCycle
439
        CAENVME_FIFOMBLTWriteCycle
448
        -----------------------------------------------------------------------------
440
        -----------------------------------------------------------------------------
449
        Parameters:
441
        Parameters:
450
                [in]  Handle    : The handle that identifies the device.
442
                [in]  Handle    : The handle that identifies the device.
451
                [in]  Address   : The VME bus address.
443
                [in]  Address   : The VME bus address.
452
                [in]  Buffer    : The data to be written to the VME bus.
444
                [in]  Buffer    : The data to be written to the VME bus.
453
                [in]  Size      : The size of the transfer in bytes.
445
                [in]  Size      : The size of the transfer in bytes.
454
                [in]  AM        : The address modifier (see CVAddressModifier enum).
446
                [in]  AM        : The address modifier (see CVAddressModifier enum).
455
                [out] count     : The number of bytes transferred.
447
                [out] count     : The number of bytes transferred.
456
        -----------------------------------------------------------------------------
448
        -----------------------------------------------------------------------------
457
        Returns:
449
        Returns:
458
                An error code about the execution of the function.
450
                An error code about the execution of the function.
459
        -----------------------------------------------------------------------------
451
        -----------------------------------------------------------------------------
460
        Description:
452
        Description:
461
                The function performs a VME multiplexed block transfer write cycle.
453
                The function performs a VME multiplexed block transfer write cycle.
462
                The address is not incremented during the cycle.
454
                The address is not incremented during the cycle.
463
*/
455
*/
464
CAENVME_API
456
CAENVME_API
465
CAENVME_FIFOMBLTWriteCycle(int32_t Handle, uint32_t Address, void *Buffer,
457
CAENVME_FIFOMBLTWriteCycle(int32_t Handle, uint32_t Address, void *Buffer,
466
                           int size, CVAddressModifier AM, int *count);
458
                           int size, CVAddressModifier AM, int *count);
467
 
459
 
468
/*
460
/*
469
        CAENVME_ADOCycle
461
        CAENVME_ADOCycle
470
        -----------------------------------------------------------------------------
462
        -----------------------------------------------------------------------------
471
        Parameters:
463
        Parameters:
472
                [in]  Handle    : The handle that identifies the device.
464
                [in]  Handle    : The handle that identifies the device.
473
                [in]  Address   : The VME bus address.
465
                [in]  Address   : The VME bus address.
474
                [in]  AM        : The address modifier (see CVAddressModifier enum).
466
                [in]  AM        : The address modifier (see CVAddressModifier enum).
475
        -----------------------------------------------------------------------------
467
        -----------------------------------------------------------------------------
476
        Returns:
468
        Returns:
477
                An error code about the execution of the function.
469
                An error code about the execution of the function.
478
        -----------------------------------------------------------------------------
470
        -----------------------------------------------------------------------------
479
        Description:
471
        Description:
480
                The function performs a VME address only cycle. It can be used to
472
                The function performs a VME address only cycle. It can be used to
481
                perform MBLT transfers using 64 bit data width.
473
                perform MBLT transfers using 64 bit data width.
482
*/
474
*/
483
CAENVME_API
475
CAENVME_API
484
CAENVME_ADOCycle(int32_t Handle, uint32_t Address, CVAddressModifier AM);
476
CAENVME_ADOCycle(int32_t Handle, uint32_t Address, CVAddressModifier AM);
485
 
477
 
486
/*
478
/*
487
        CAENVME_ADOHCycle
479
        CAENVME_ADOHCycle
488
        -----------------------------------------------------------------------------
480
        -----------------------------------------------------------------------------
489
        Parameters:
481
        Parameters:
490
                [in]  Handle    : The handle that identifies the device.
482
                [in]  Handle    : The handle that identifies the device.
491
                [in]  Address   : The VME bus address.
483
                [in]  Address   : The VME bus address.
492
                [in]  AM        : The address modifier (see CVAddressModifier enum).
484
                [in]  AM        : The address modifier (see CVAddressModifier enum).
493
        -----------------------------------------------------------------------------
485
        -----------------------------------------------------------------------------
494
        Returns:
486
        Returns:
495
                An error code about the execution of the function.
487
                An error code about the execution of the function.
496
        -----------------------------------------------------------------------------
488
        -----------------------------------------------------------------------------
497
        Description:
489
        Description:
498
                The function performs a VME address only with handshake cycle.
490
                The function performs a VME address only with handshake cycle.
499
*/
491
*/
500
CAENVME_API
492
CAENVME_API
501
CAENVME_ADOHCycle(int32_t Handle, uint32_t Address, CVAddressModifier AM);
493
CAENVME_ADOHCycle(int32_t Handle, uint32_t Address, CVAddressModifier AM);
502
 
494
 
503
/*
495
/*
504
        CAENVME_IACKCycle
496
        CAENVME_IACKCycle
505
        -----------------------------------------------------------------------------
497
        -----------------------------------------------------------------------------
506
        Parameters:
498
        Parameters:
507
                [in]  Handle    : The handle that identifies the device.
499
                [in]  Handle    : The handle that identifies the device.
508
                [in]  Level     : The IRQ level to acknowledge (see CVIRQLevels enum).
500
                [in]  Level     : The IRQ level to acknowledge (see CVIRQLevels enum).
509
                [in]  DW        : The data width.(see CVDataWidth enum).
501
                [in]  DW        : The data width.(see CVDataWidth enum).
510
        -----------------------------------------------------------------------------
502
        -----------------------------------------------------------------------------
511
        Returns:
503
        Returns:
512
                An error code about the execution of the function.
504
                An error code about the execution of the function.
513
        -----------------------------------------------------------------------------
505
        -----------------------------------------------------------------------------
514
        Description:
506
        Description:
515
                The function performs a VME interrupt acknowledge cycle.
507
                The function performs a VME interrupt acknowledge cycle.
516
*/
508
*/
517
CAENVME_API
509
CAENVME_API
518
CAENVME_IACKCycle(int32_t Handle, CVIRQLevels Level, void *Vector, CVDataWidth DW);
510
CAENVME_IACKCycle(int32_t Handle, CVIRQLevels Level, void *Vector, CVDataWidth DW);
519
 
511
 
520
/*
512
/*
521
        CAENVME_IRQCheck
513
        CAENVME_IRQCheck
522
        -----------------------------------------------------------------------------
514
        -----------------------------------------------------------------------------
523
        Parameters:
515
        Parameters:
524
                [in]  Handle    : The handle that identifies the device.
516
                [in]  Handle    : The handle that identifies the device.
525
                [out] Mask      : A bit-mask indicating the active IRQ lines.
517
                [out] Mask      : A bit-mask indicating the active IRQ lines.
526
        -----------------------------------------------------------------------------
518
        -----------------------------------------------------------------------------
527
        Returns:
519
        Returns:
528
                An error code about the execution of the function.
520
                An error code about the execution of the function.
529
        -----------------------------------------------------------------------------
521
        -----------------------------------------------------------------------------
530
        Description:
522
        Description:
531
                The function returns a bit mask indicating the active IRQ lines.
523
                The function returns a bit mask indicating the active IRQ lines.
532
*/
524
*/
533
CAENVME_API
525
CAENVME_API
534
CAENVME_IRQCheck(int32_t Handle, CAEN_BYTE *Mask);
526
CAENVME_IRQCheck(int32_t Handle, CAEN_BYTE *Mask);
535
 
527
 
536
/*
528
/*
537
        CAENVME_IRQEnable
529
        CAENVME_IRQEnable
538
        -----------------------------------------------------------------------------
530
        -----------------------------------------------------------------------------
539
        Parameters:
531
        Parameters:
540
                [in]  Handle    : The handle that identifies the device.
532
                [in]  Handle    : The handle that identifies the device.
541
                [in]  Mask      : A bit-mask indicating the IRQ lines.
533
                [in]  Mask      : A bit-mask indicating the IRQ lines.
542
        -----------------------------------------------------------------------------
534
        -----------------------------------------------------------------------------
543
        Returns:
535
        Returns:
544
                An error code about the execution of the function.
536
                An error code about the execution of the function.
545
        -----------------------------------------------------------------------------
537
        -----------------------------------------------------------------------------
546
        Description:
538
        Description:
547
                The function enables the IRQ lines specified by Mask.
539
                The function enables the IRQ lines specified by Mask.
548
*/
540
*/
549
CAENVME_API
541
CAENVME_API
550
CAENVME_IRQEnable(int32_t Handle, uint32_t Mask);
542
CAENVME_IRQEnable(int32_t Handle, uint32_t Mask);
551
 
543
 
552
/*
544
/*
553
        CAENVME_IRQDisable
545
        CAENVME_IRQDisable
554
        -----------------------------------------------------------------------------
546
        -----------------------------------------------------------------------------
555
        Parameters:
547
        Parameters:
556
                [in]  Handle    : The handle that identifies the device.
548
                [in]  Handle    : The handle that identifies the device.
557
                [in]  Mask      : A bit-mask indicating the IRQ lines.
549
                [in]  Mask      : A bit-mask indicating the IRQ lines.
558
        -----------------------------------------------------------------------------
550
        -----------------------------------------------------------------------------
559
        Returns:
551
        Returns:
560
                An error code about the execution of the function.
552
                An error code about the execution of the function.
561
        -----------------------------------------------------------------------------
553
        -----------------------------------------------------------------------------
562
        Description:
554
        Description:
563
                The function disables the IRQ lines specified by Mask.
555
                The function disables the IRQ lines specified by Mask.
564
*/
556
*/
565
CAENVME_API
557
CAENVME_API
566
CAENVME_IRQDisable(int32_t Handle, uint32_t Mask);
558
CAENVME_IRQDisable(int32_t Handle, uint32_t Mask);
567
 
559
 
568
/*
560
/*
569
        CAENVME_IRQWait
561
        CAENVME_IRQWait
570
        -----------------------------------------------------------------------------
562
        -----------------------------------------------------------------------------
571
        Parameters:
563
        Parameters:
572
                [in]  Handle    : The handle that identifies the device.
564
                [in]  Handle    : The handle that identifies the device.
573
                [in]  Mask      : A bit-mask indicating the IRQ lines.
565
                [in]  Mask      : A bit-mask indicating the IRQ lines.
574
                [in]  Timeout   : Timeout in milliseconds.
566
                [in]  Timeout   : Timeout in milliseconds.
575
        -----------------------------------------------------------------------------
567
        -----------------------------------------------------------------------------
576
        Returns:
568
        Returns:
577
                An error code about the execution of the function.
569
                An error code about the execution of the function.
578
        -----------------------------------------------------------------------------
570
        -----------------------------------------------------------------------------
579
        Description:
571
        Description:
580
                The function wait the IRQ lines specified by Mask until one of
572
                The function wait the IRQ lines specified by Mask until one of
581
                them raise or timeout expires.
573
                them raise or timeout expires.
582
*/
574
*/
583
CAENVME_API
575
CAENVME_API
584
CAENVME_IRQWait(int32_t Handle, uint32_t Mask, uint32_t Timeout);
576
CAENVME_IRQWait(int32_t Handle, uint32_t Mask, uint32_t Timeout);
585
 
577
 
586
/*
578
/*
587
        CAENVME_SetPulserConf
579
        CAENVME_SetPulserConf
588
        -----------------------------------------------------------------------------
580
        -----------------------------------------------------------------------------
589
        Parameters:
581
        Parameters:
590
                [in]  Handle    : The handle that identifies the device.
582
                [in]  Handle    : The handle that identifies the device.
591
                [in]  PulSel    : The pulser to configure (see CVPulserSelect enum).
583
                [in]  PulSel    : The pulser to configure (see CVPulserSelect enum).
592
                [in]  Period    : The period of the pulse in time units.
584
                [in]  Period    : The period of the pulse in time units.
593
                [in]  Width     : The width of the pulse in time units.
585
                [in]  Width     : The width of the pulse in time units.
594
                [in]  Unit      : The time unit for the pulser configuration (see
586
                [in]  Unit      : The time unit for the pulser configuration (see
595
                                  CVTimeUnits enum).
587
                                  CVTimeUnits enum).
596
                [in]  PulseNo   : The number of pulses to generate (0 = infinite).
588
                [in]  PulseNo   : The number of pulses to generate (0 = infinite).
597
                [in]  Start     : The source signal to start the pulse burst (see
589
                [in]  Start     : The source signal to start the pulse burst (see
598
                                  CVIOSources enum).
590
                                  CVIOSources enum).
599
                [in]  Reset     : The source signal to stop the pulse burst (see
591
                [in]  Reset     : The source signal to stop the pulse burst (see
600
                                  CVIOSources enum).
592
                                  CVIOSources enum).
601
        -----------------------------------------------------------------------------
593
        -----------------------------------------------------------------------------
602
        Returns:
594
        Returns:
603
                An error code about the execution of the function.
595
                An error code about the execution of the function.
604
        -----------------------------------------------------------------------------
596
        -----------------------------------------------------------------------------
605
        Description:
597
        Description:
606
                The function permits to configure the pulsers. All the timing parameters
598
                The function permits to configure the pulsers. All the timing parameters
607
                are expressed in the time units specified. The start signal source can be
599
                are expressed in the time units specified. The start signal source can be
608
                one of: front panel button or software (cvManualSW), input signal 0
600
                one of: front panel button or software (cvManualSW), input signal 0
609
                (cvInputSrc0),input signal 1 (cvInputSrc1) or input coincidence
601
                (cvInputSrc0),input signal 1 (cvInputSrc1) or input coincidence
610
                (cvCoincidence). The reset signal source can be: front panel button or
602
                (cvCoincidence). The reset signal source can be: front panel button or
611
                software (cvManualSW) or, for pulser A the input signal 0 (cvInputSrc0),
603
                software (cvManualSW) or, for pulser A the input signal 0 (cvInputSrc0),
612
                for pulser B the input signal 1 (cvInputSrc1).
604
                for pulser B the input signal 1 (cvInputSrc1).
613
*/
605
*/
614
CAENVME_API
606
CAENVME_API
615
CAENVME_SetPulserConf(int32_t Handle, CVPulserSelect PulSel, unsigned char Period,
607
CAENVME_SetPulserConf(int32_t Handle, CVPulserSelect PulSel, unsigned char Period,
616
                      unsigned char Width, CVTimeUnits Unit, unsigned char PulseNo,
608
                      unsigned char Width, CVTimeUnits Unit, unsigned char PulseNo,
617
                      CVIOSources Start, CVIOSources Reset);
609
                      CVIOSources Start, CVIOSources Reset);
618
 
610
 
619
/*
611
/*
620
        CAENVME_SetScalerConf
612
        CAENVME_SetScalerConf
621
        -----------------------------------------------------------------------------
613
        -----------------------------------------------------------------------------
622
        Parameters:
614
        Parameters:
623
                [in]  Handle    : The handle that identifies the device.
615
                [in]  Handle    : The handle that identifies the device.
624
                [in]  Limit     : The counter limit for the scaler.
616
                [in]  Limit     : The counter limit for the scaler.
625
                [in]  AutoReset : Enable/disable the counter auto reset.
617
                [in]  AutoReset : Enable/disable the counter auto reset.
626
                [in]  Hit       : The source signal for the signal to count (see
618
                [in]  Hit       : The source signal for the signal to count (see
627
                                  CVIOSources enum).
619
                                  CVIOSources enum).
628
                [in]  Gate      : The source signal for the gate (see CVIOSources enum).
620
                [in]  Gate      : The source signal for the gate (see CVIOSources enum).
629
                [in]  Reset     : The source signal to stop the counter (see
621
                [in]  Reset     : The source signal to stop the counter (see
630
                                  CVIOSources enum).
622
                                  CVIOSources enum).
631
        -----------------------------------------------------------------------------
623
        -----------------------------------------------------------------------------
632
        Returns:
624
        Returns:
633
                An error code about the execution of the function.
625
                An error code about the execution of the function.
634
        -----------------------------------------------------------------------------
626
        -----------------------------------------------------------------------------
635
        Description:
627
        Description:
636
                The function permits to configure the scaler. Limit range is 0 - 1024
628
                The function permits to configure the scaler. Limit range is 0 - 1024
637
                (10 bit). The hit signal source can be: input signal 0 (cvInputSrc0)
629
                (10 bit). The hit signal source can be: input signal 0 (cvInputSrc0)
638
                or input coincidence (cvCoincidence). The gate signal source can be:
630
                or input coincidence (cvCoincidence). The gate signal source can be:
639
                front panel button or software (cvManualSW) or input signal 1
631
                front panel button or software (cvManualSW) or input signal 1
640
                (cvInputSrc1). The reset signal source can be: front panel button or
632
                (cvInputSrc1). The reset signal source can be: front panel button or
641
                software (cvManualSW) or input signal 1 (cvInputSrc1).
633
                software (cvManualSW) or input signal 1 (cvInputSrc1).
642
*/
634
*/
643
CAENVME_API
635
CAENVME_API
644
CAENVME_SetScalerConf(int32_t Handle, short Limit, short AutoReset,
636
CAENVME_SetScalerConf(int32_t Handle, short Limit, short AutoReset,
645
                      CVIOSources Hit, CVIOSources Gate, CVIOSources Reset);
637
                      CVIOSources Hit, CVIOSources Gate, CVIOSources Reset);
646
 
638
 
647
/*
639
/*
648
        CAENVME_SetOutputConf
640
        CAENVME_SetOutputConf
649
        -----------------------------------------------------------------------------
641
        -----------------------------------------------------------------------------
650
        Parameters:
642
        Parameters:
651
                [in]  Handle    : The handle that identifies the device.
643
                [in]  Handle    : The handle that identifies the device.
652
                [in]  OutSel    : The output line to configure (see CVOutputSelect
644
                [in]  OutSel    : The output line to configure (see CVOutputSelect
653
                                  enum).
645
                                  enum).
654
                [in]  OutPol    : The output line polarity (see CVIOPolarity enum).
646
                [in]  OutPol    : The output line polarity (see CVIOPolarity enum).
655
                [in]  LEDPol    : The output LED polarity (see CVLEDPolarity enum).
647
                [in]  LEDPol    : The output LED polarity (see CVLEDPolarity enum).
656
                [in]  Source    : The source signal to propagate to the output line
648
                [in]  Source    : The source signal to propagate to the output line
657
                                  (see CVIOSources enum).
649
                                  (see CVIOSources enum).
658
        -----------------------------------------------------------------------------
650
        -----------------------------------------------------------------------------
659
        Returns:
651
        Returns:
660
                An error code about the execution of the function.
652
                An error code about the execution of the function.
661
        -----------------------------------------------------------------------------
653
        -----------------------------------------------------------------------------
662
        Description:
654
        Description:
663
                The function permits to configure the output lines of the module. It
655
                The function permits to configure the output lines of the module. It
664
                can be specified the polarity for the line and for the LED. The
656
                can be specified the polarity for the line and for the LED. The
665
                output line source depends on the line as figured out by the
657
                output line source depends on the line as figured out by the
666
                following table:
658
                following table:
667
 
659
 
668
                +-----------------------------------------------------------+
660
                +-----------------------------------------------------------+
669
                !           S O U R C E      S E L E C T I O N              !
661
                !           S O U R C E      S E L E C T I O N              !
670
                +--------------+---------------+---------------+------------+
662
                +--------------+---------------+---------------+------------+
671
                ! cvVMESignals ! cvCoincidence ! cvMiscSignals ! cvManualSW !
663
                ! cvVMESignals ! cvCoincidence ! cvMiscSignals ! cvManualSW !
672
        +---+---+--------------+---------------+---------------+------------+
664
        +---+---+--------------+---------------+---------------+------------+
673
        !   ! 0 !      DS      ! Input Coinc.  !   Pulser A    ! Manual/SW  !
665
        !   ! 0 !      DS      ! Input Coinc.  !   Pulser A    ! Manual/SW  !
674
        ! O +---+--------------+---------------+---------------+------------+
666
        ! O +---+--------------+---------------+---------------+------------+
675
        ! U ! 1 !      AS      ! Input Coinc.  !   Pulser A    ! Manual/SW  !
667
        ! U ! 1 !      AS      ! Input Coinc.  !   Pulser A    ! Manual/SW  !
676
        ! T +---+--------------+---------------+---------------+------------+
668
        ! T +---+--------------+---------------+---------------+------------+
677
        ! P ! 2 !    DTACK     ! Input Coinc.  !   Pulser B    ! Manual/SW  !
669
        ! P ! 2 !    DTACK     ! Input Coinc.  !   Pulser B    ! Manual/SW  !
678
        ! U +---+--------------+---------------+---------------+------------+
670
        ! U +---+--------------+---------------+---------------+------------+
679
        ! T ! 3 !     BERR     ! Input Coinc.  !   Pulser B    ! Manual/SW  !
671
        ! T ! 3 !     BERR     ! Input Coinc.  !   Pulser B    ! Manual/SW  !
680
        !   +---+--------------+---------------+---------------+------------+
672
        !   +---+--------------+---------------+---------------+------------+
681
        !   ! 4 !     LMON     ! Input Coinc.  !  Scaler end   ! Manual/SW  !
673
        !   ! 4 !     LMON     ! Input Coinc.  !  Scaler end   ! Manual/SW  !
682
        +---+---+--------------+---------------+---------------+------------+
674
        +---+---+--------------+---------------+---------------+------------+
683
*/
675
*/
684
CAENVME_API
676
CAENVME_API
685
CAENVME_SetOutputConf(int32_t Handle, CVOutputSelect OutSel, CVIOPolarity OutPol,
677
CAENVME_SetOutputConf(int32_t Handle, CVOutputSelect OutSel, CVIOPolarity OutPol,
686
                      CVLEDPolarity LEDPol, CVIOSources Source);
678
                      CVLEDPolarity LEDPol, CVIOSources Source);
687
 
679
 
688
/*
680
/*
689
        CAENVME_SetInputConf
681
        CAENVME_SetInputConf
690
        -----------------------------------------------------------------------------
682
        -----------------------------------------------------------------------------
691
        Parameters:
683
        Parameters:
692
                [in]  Handle    : The handle that identifies the device.
684
                [in]  Handle    : The handle that identifies the device.
693
                [in]  InSel     : The input line to configure (see CVInputSelect enum).
685
                [in]  InSel     : The input line to configure (see CVInputSelect enum).
694
                [in]  InPol     : The input line polarity (see CVIOPolarity enum).
686
                [in]  InPol     : The input line polarity (see CVIOPolarity enum).
695
                [in]  LEDPol    : The output LED polarity (see CVLEDPolarity enum).
687
                [in]  LEDPol    : The output LED polarity (see CVLEDPolarity enum).
696
        -----------------------------------------------------------------------------
688
        -----------------------------------------------------------------------------
697
        Returns:
689
        Returns:
698
                An error code about the execution of the function.
690
                An error code about the execution of the function.
699
        -----------------------------------------------------------------------------
691
        -----------------------------------------------------------------------------
700
        Description:
692
        Description:
701
                The function permits to configure the input lines of the module. It
693
                The function permits to configure the input lines of the module. It
702
                ca be specified the polarity for the line and for the LED.
694
                ca be specified the polarity for the line and for the LED.
703
*/
695
*/
704
CAENVME_API
696
CAENVME_API
705
CAENVME_SetInputConf(int32_t Handle, CVInputSelect InSel, CVIOPolarity InPol,
697
CAENVME_SetInputConf(int32_t Handle, CVInputSelect InSel, CVIOPolarity InPol,
706
                     CVLEDPolarity LEDPol);
698
                     CVLEDPolarity LEDPol);
707
 
699
 
708
/*
700
/*
709
        CAENVME_GetPulserConf
701
        CAENVME_GetPulserConf
710
        -----------------------------------------------------------------------------
702
        -----------------------------------------------------------------------------
711
        Parameters:
703
        Parameters:
712
                [in]  Handle    : The handle that identifies the device.
704
                [in]  Handle    : The handle that identifies the device.
713
                [in]  PulSel    : The pulser to configure (see CVPulserSelect enum).
705
                [in]  PulSel    : The pulser to configure (see CVPulserSelect enum).
714
                [out] Period    : The period of the pulse in time units.
706
                [out] Period    : The period of the pulse in time units.
715
                [out] Width     : The width of the pulse in time units.
707
                [out] Width     : The width of the pulse in time units.
716
                [out] Unit      : The time unit for the pulser configuration (see
708
                [out] Unit      : The time unit for the pulser configuration (see
717
                                  CVTimeUnits enum).
709
                                  CVTimeUnits enum).
718
                [out] PulseNo   : The number of pulses to generate (0 = infinite).
710
                [out] PulseNo   : The number of pulses to generate (0 = infinite).
719
                [out] Start     : The source signal to start the pulse burst (see
711
                [out] Start     : The source signal to start the pulse burst (see
720
                                  CVIOSources enum).
712
                                  CVIOSources enum).
721
                [out] Reset     : The source signal to stop the pulse burst (see
713
                [out] Reset     : The source signal to stop the pulse burst (see
722
                                  CVIOSources enum).
714
                                  CVIOSources enum).
723
        -----------------------------------------------------------------------------
715
        -----------------------------------------------------------------------------
724
        Returns:
716
        Returns:
725
                An error code about the execution of the function.
717
                An error code about the execution of the function.
726
        -----------------------------------------------------------------------------
718
        -----------------------------------------------------------------------------
727
        Description:
719
        Description:
728
                The function permits to read the configuration of the pulsers.
720
                The function permits to read the configuration of the pulsers.
729
*/
721
*/
730
CAENVME_API
722
CAENVME_API
731
CAENVME_GetPulserConf(int32_t Handle, CVPulserSelect PulSel, unsigned char *Period,
723
CAENVME_GetPulserConf(int32_t Handle, CVPulserSelect PulSel, unsigned char *Period,
732
                      unsigned char *Width, CVTimeUnits *Unit, unsigned char *PulseNo,
724
                      unsigned char *Width, CVTimeUnits *Unit, unsigned char *PulseNo,
733
                      CVIOSources *Start, CVIOSources *Reset);
725
                      CVIOSources *Start, CVIOSources *Reset);
734
 
726
 
735
/*
727
/*
736
        CAENVME_GetScalerConf
728
        CAENVME_GetScalerConf
737
        -----------------------------------------------------------------------------
729
        -----------------------------------------------------------------------------
738
        Parameters:
730
        Parameters:
739
                [in]  Handle    : The handle that identifies the device.
731
                [in]  Handle    : The handle that identifies the device.
740
                [out] Limit     : The counter limit for the scaler.
732
                [out] Limit     : The counter limit for the scaler.
741
                [out] AutoReset : The auto reset configuration.
733
                [out] AutoReset : The auto reset configuration.
742
                [out] Hit       : The source signal for the signal to count (see
734
                [out] Hit       : The source signal for the signal to count (see
743
                                  CVIOSources enum).
735
                                  CVIOSources enum).
744
                [out] Gate      : The source signal for the gate (see CVIOSources enum).
736
                [out] Gate      : The source signal for the gate (see CVIOSources enum).
745
                [out] Reset     : The source signal to stop the counter (see
737
                [out] Reset     : The source signal to stop the counter (see
746
                                  CVIOSources enum).
738
                                  CVIOSources enum).
747
        -----------------------------------------------------------------------------
739
        -----------------------------------------------------------------------------
748
        Returns:
740
        Returns:
749
                An error code about the execution of the function.
741
                An error code about the execution of the function.
750
        -----------------------------------------------------------------------------
742
        -----------------------------------------------------------------------------
751
        Description:
743
        Description:
752
                The function permits to read the configuration of the scaler.
744
                The function permits to read the configuration of the scaler.
753
*/
745
*/
754
CAENVME_API
746
CAENVME_API
755
CAENVME_GetScalerConf(int32_t Handle, short *Limit, short *AutoReset,
747
CAENVME_GetScalerConf(int32_t Handle, short *Limit, short *AutoReset,
756
                      CVIOSources *Hit, CVIOSources *Gate, CVIOSources *Reset);
748
                      CVIOSources *Hit, CVIOSources *Gate, CVIOSources *Reset);
757
 
749
 
758
 
750
 
759
/*
751
/*
760
        CAENVME_SetOutputConf
752
        CAENVME_SetOutputConf
761
        -----------------------------------------------------------------------------
753
        -----------------------------------------------------------------------------
762
        Parameters:
754
        Parameters:
763
                [in]  Handle    : The handle that identifies the device.
755
                [in]  Handle    : The handle that identifies the device.
764
                [in]  OutSel    : The output line to configure (see CVOutputSelect enum).
756
                [in]  OutSel    : The output line to configure (see CVOutputSelect enum).
765
                [out] OutPol    : The output line polarity (see CVIOPolarity enum).
757
                [out] OutPol    : The output line polarity (see CVIOPolarity enum).
766
                [out] LEDPol    : The output LED polarity (see CVLEDPolarity enum).
758
                [out] LEDPol    : The output LED polarity (see CVLEDPolarity enum).
767
                [out] Source    : The source signal to propagate to the output line (see
759
                [out] Source    : The source signal to propagate to the output line (see
768
                                  CVIOSources enum).
760
                                  CVIOSources enum).
769
        -----------------------------------------------------------------------------
761
        -----------------------------------------------------------------------------
770
        Returns:
762
        Returns:
771
                An error code about the execution of the function.
763
                An error code about the execution of the function.
772
        -----------------------------------------------------------------------------
764
        -----------------------------------------------------------------------------
773
        Description:
765
        Description:
774
                The function permits to read the configuration of the output lines.
766
                The function permits to read the configuration of the output lines.
775
*/
767
*/
776
CAENVME_API
768
CAENVME_API
777
CAENVME_GetOutputConf(int32_t Handle, CVOutputSelect OutSel, CVIOPolarity *OutPol,
769
CAENVME_GetOutputConf(int32_t Handle, CVOutputSelect OutSel, CVIOPolarity *OutPol,
778
                      CVLEDPolarity *LEDPol, CVIOSources *Source);
770
                      CVLEDPolarity *LEDPol, CVIOSources *Source);
779
 
771
 
780
/*
772
/*
781
        CAENVME_SetInputConf
773
        CAENVME_SetInputConf
782
        -----------------------------------------------------------------------------
774
        -----------------------------------------------------------------------------
783
        Parameters:
775
        Parameters:
784
                [in]  Handle    : The handle that identifies the device.
776
                [in]  Handle    : The handle that identifies the device.
785
                [in]  InSel     : The input line to configure (see CVInputSelect enum).
777
                [in]  InSel     : The input line to configure (see CVInputSelect enum).
786
                [out] InPol     : The input line polarity (see CVIOPolarity enum).
778
                [out] InPol     : The input line polarity (see CVIOPolarity enum).
787
                [out] LEDPol    : The output LED polarity (see CVLEDPolarity enum).
779
                [out] LEDPol    : The output LED polarity (see CVLEDPolarity enum).
788
        -----------------------------------------------------------------------------
780
        -----------------------------------------------------------------------------
789
        Returns:
781
        Returns:
790
                An error code about the execution of the function.
782
                An error code about the execution of the function.
791
        -----------------------------------------------------------------------------
783
        -----------------------------------------------------------------------------
792
        Description:
784
        Description:
793
                The function permits to read the configuration of the input lines.
785
                The function permits to read the configuration of the input lines.
794
*/
786
*/
795
CAENVME_API
787
CAENVME_API
796
CAENVME_GetInputConf(int32_t Handle, CVInputSelect InSel, CVIOPolarity *InPol,
788
CAENVME_GetInputConf(int32_t Handle, CVInputSelect InSel, CVIOPolarity *InPol,
797
                     CVLEDPolarity *LEDPol);
789
                     CVLEDPolarity *LEDPol);
798
 
790
 
799
/*
791
/*
800
        CAENVME_ReadRegister
792
        CAENVME_ReadRegister
801
        -----------------------------------------------------------------------------
793
        -----------------------------------------------------------------------------
802
        Parameters:
794
        Parameters:
803
                [in]  Handle    : The handle that identifies the device.
795
                [in]  Handle    : The handle that identifies the device.
804
                [in]  Reg       : The internal register to read (see CVRegisters enum).
796
                [in]  Reg       : The internal register to read (see CVRegisters enum).
805
                [out] Data      : The data read from the module.
797
                [out] Data      : The data read from the module.
806
        -----------------------------------------------------------------------------
798
        -----------------------------------------------------------------------------
807
        Returns:
799
        Returns:
808
                An error code about the execution of the function.
800
                An error code about the execution of the function.
809
        -----------------------------------------------------------------------------
801
        -----------------------------------------------------------------------------
810
        Description:
802
        Description:
811
                The function permits to read all internal registers.
803
                The function permits to read all internal registers.
812
*/
804
*/
813
CAENVME_API
805
CAENVME_API
814
CAENVME_ReadRegister(int32_t Handle, CVRegisters Reg, unsigned int *Data);
806
CAENVME_ReadRegister(int32_t Handle, CVRegisters Reg, unsigned int *Data);
815
 
807
 
816
/*
808
/*
817
        CAENVME_WriteRegister
809
        CAENVME_WriteRegister
818
        -----------------------------------------------------------------------------
810
        -----------------------------------------------------------------------------
819
        Parameters:
811
        Parameters:
820
                [in]  Handle    : The handle that identifies the device.
812
                [in]  Handle    : The handle that identifies the device.
821
                [in]  Reg       : The internal register to read (see CVRegisters enum).
813
                [in]  Reg       : The internal register to read (see CVRegisters enum).
822
                [in]  Data      : The data to be written to the module.
814
                [in]  Data      : The data to be written to the module.
823
        -----------------------------------------------------------------------------
815
        -----------------------------------------------------------------------------
824
        Returns:
816
        Returns:
825
                An error code about the execution of the function.
817
                An error code about the execution of the function.
826
        -----------------------------------------------------------------------------
818
        -----------------------------------------------------------------------------
827
        Description:
819
        Description:
828
                The function permits to write to all internal registers.
820
                The function permits to write to all internal registers.
829
*/
821
*/
830
CAENVME_API
822
CAENVME_API
831
CAENVME_WriteRegister(int32_t Handle, CVRegisters Reg, unsigned int Data);
823
CAENVME_WriteRegister(int32_t Handle, CVRegisters Reg, unsigned int Data);
832
 
824
 
833
/*
825
/*
834
        CAENVME_SetOutputRegister
826
        CAENVME_SetOutputRegister
835
        -----------------------------------------------------------------------------
827
        -----------------------------------------------------------------------------
836
        Parameters:
828
        Parameters:
837
                [in]  Handle    : The handle that identifies the device.
829
                [in]  Handle    : The handle that identifies the device.
838
                [in]  Mask      : The lines to be set.
830
                [in]  Mask      : The lines to be set.
839
        -----------------------------------------------------------------------------
831
        -----------------------------------------------------------------------------
840
        Returns:
832
        Returns:
841
                An error code about the execution of the function.
833
                An error code about the execution of the function.
842
        -----------------------------------------------------------------------------
834
        -----------------------------------------------------------------------------
843
        Description:
835
        Description:
844
                The function sets the lines specified. Refer the CVOutputRegisterBits
836
                The function sets the lines specified. Refer the CVOutputRegisterBits
845
                enum to compose and decoding the bit mask.
837
                enum to compose and decoding the bit mask.
846
*/
838
*/
847
CAENVME_API
839
CAENVME_API
848
CAENVME_SetOutputRegister(int32_t Handle, unsigned short Mask);
840
CAENVME_SetOutputRegister(int32_t Handle, unsigned short Mask);
849
 
841
 
850
/*
842
/*
851
        CAENVME_ClearOutputRegister
843
        CAENVME_ClearOutputRegister
852
        -----------------------------------------------------------------------------
844
        -----------------------------------------------------------------------------
853
        Parameters:
845
        Parameters:
854
                [in]  Handle    : The handle that identifies the device.
846
                [in]  Handle    : The handle that identifies the device.
855
                [in]  Mask      : The IRQ lines to be cleared.
847
                [in]  Mask      : The IRQ lines to be cleared.
856
        -----------------------------------------------------------------------------
848
        -----------------------------------------------------------------------------
857
        Returns:
849
        Returns:
858
                An error code about the execution of the function.
850
                An error code about the execution of the function.
859
        -----------------------------------------------------------------------------
851
        -----------------------------------------------------------------------------
860
        Description:
852
        Description:
861
                The function clears the lines specified. Refer the CVOutputRegisterBits
853
                The function clears the lines specified. Refer the CVOutputRegisterBits
862
                enum to compose and decoding the bit mask.
854
                enum to compose and decoding the bit mask.
863
*/
855
*/
864
CAENVME_API
856
CAENVME_API
865
CAENVME_ClearOutputRegister(int32_t Handle, unsigned short Mask);
857
CAENVME_ClearOutputRegister(int32_t Handle, unsigned short Mask);
866
 
858
 
867
/*
859
/*
868
        CAENVME_PulseOutputRegister
860
        CAENVME_PulseOutputRegister
869
        -----------------------------------------------------------------------------
861
        -----------------------------------------------------------------------------
870
        Parameters:
862
        Parameters:
871
                [in]  Handle    : The handle that identifies the device.
863
                [in]  Handle    : The handle that identifies the device.
872
                [in]  Mask      : The lines to be pulsed.
864
                [in]  Mask      : The lines to be pulsed.
873
        -----------------------------------------------------------------------------
865
        -----------------------------------------------------------------------------
874
        Returns:
866
        Returns:
875
                An error code about the execution of the function.
867
                An error code about the execution of the function.
876
        -----------------------------------------------------------------------------
868
        -----------------------------------------------------------------------------
877
        Description:
869
        Description:
878
                The function produces a pulse with the lines specified by setting and
870
                The function produces a pulse with the lines specified by setting and
879
                then clearing them. Refer the CVOutputRegisterBits enum to compose and
871
                then clearing them. Refer the CVOutputRegisterBits enum to compose and
880
                decoding the bit mask.
872
                decoding the bit mask.
881
*/
873
*/
882
CAENVME_API
874
CAENVME_API
883
CAENVME_PulseOutputRegister(int32_t Handle, unsigned short Mask);
875
CAENVME_PulseOutputRegister(int32_t Handle, unsigned short Mask);
884
 
876
 
885
/*
877
/*
886
        CAENVME_ReadDisplay
878
        CAENVME_ReadDisplay
887
        -----------------------------------------------------------------------------
879
        -----------------------------------------------------------------------------
888
        Parameters:
880
        Parameters:
889
                [in]  Handle    : The handle that identifies the device.
881
                [in]  Handle    : The handle that identifies the device.
890
                [out] Value     : The values read from the module (see CVDisplay enum).
882
                [out] Value     : The values read from the module (see CVDisplay enum).
891
        -----------------------------------------------------------------------------
883
        -----------------------------------------------------------------------------
892
        Returns:
884
        Returns:
893
                An error code about the execution of the function.
885
                An error code about the execution of the function.
894
        -----------------------------------------------------------------------------
886
        -----------------------------------------------------------------------------
895
        Description:
887
        Description:
896
                The function reads the VME data display on the front panel of the module.
888
                The function reads the VME data display on the front panel of the module.
897
                Refer to the CVDisplay data type definition and comments to decode the
889
                Refer to the CVDisplay data type definition and comments to decode the
898
                value returned.
890
                value returned.
899
*/
891
*/
900
CAENVME_API
892
CAENVME_API
901
CAENVME_ReadDisplay(int32_t Handle, CVDisplay *Value);
893
CAENVME_ReadDisplay(int32_t Handle, CVDisplay *Value);
902
 
894
 
903
/*
895
/*
904
        CAENVME_SetArbiterType
896
        CAENVME_SetArbiterType
905
        -----------------------------------------------------------------------------
897
        -----------------------------------------------------------------------------
906
        Parameters:
898
        Parameters:
907
                [in]  Handle    : The handle that identifies the device.
899
                [in]  Handle    : The handle that identifies the device.
908
                [in]  Value     : The type of VME bus arbitration to implement (see
900
                [in]  Value     : The type of VME bus arbitration to implement (see
909
                                  CVArbiterTypes enum).
901
                                  CVArbiterTypes enum).
910
        -----------------------------------------------------------------------------
902
        -----------------------------------------------------------------------------
911
        Returns:
903
        Returns:
912
                An error code about the execution of the function.
904
                An error code about the execution of the function.
913
        -----------------------------------------------------------------------------
905
        -----------------------------------------------------------------------------
914
        Description:
906
        Description:
915
                The function sets the behaviour of the VME bus arbiter on the module.
907
                The function sets the behaviour of the VME bus arbiter on the module.
916
*/
908
*/
917
CAENVME_API
909
CAENVME_API
918
CAENVME_SetArbiterType(int32_t Handle, CVArbiterTypes Value);
910
CAENVME_SetArbiterType(int32_t Handle, CVArbiterTypes Value);
919
 
911
 
920
/*
912
/*
921
        CAENVME_SetRequesterType
913
        CAENVME_SetRequesterType
922
        -----------------------------------------------------------------------------
914
        -----------------------------------------------------------------------------
923
        Parameters:
915
        Parameters:
924
                [in]  Handle    : The handle that identifies the device.
916
                [in]  Handle    : The handle that identifies the device.
925
                [in]  Value     : The type of VME bus requester to implement (see
917
                [in]  Value     : The type of VME bus requester to implement (see
926
                                  CVRequesterTypes enum).
918
                                  CVRequesterTypes enum).
927
        -----------------------------------------------------------------------------
919
        -----------------------------------------------------------------------------
928
        Returns:
920
        Returns:
929
                An error code about the execution of the function.
921
                An error code about the execution of the function.
930
        -----------------------------------------------------------------------------
922
        -----------------------------------------------------------------------------
931
        Description:
923
        Description:
932
                The function sets the behaviour of the VME bus requester on the module.
924
                The function sets the behaviour of the VME bus requester on the module.
933
*/
925
*/
934
CAENVME_API
926
CAENVME_API
935
CAENVME_SetRequesterType(int32_t Handle, CVRequesterTypes Value);
927
CAENVME_SetRequesterType(int32_t Handle, CVRequesterTypes Value);
936
 
928
 
937
/*
929
/*
938
        CAENVME_SetReleaseType
930
        CAENVME_SetReleaseType
939
        -----------------------------------------------------------------------------
931
        -----------------------------------------------------------------------------
940
        Parameters:
932
        Parameters:
941
                [in]  Handle    : The handle that identifies the device.
933
                [in]  Handle    : The handle that identifies the device.
942
                [in]  Value     : The type of VME bus release policy to implement (see
934
                [in]  Value     : The type of VME bus release policy to implement (see
943
                                  CVReleaseTypes enum).
935
                                  CVReleaseTypes enum).
944
        -----------------------------------------------------------------------------
936
        -----------------------------------------------------------------------------
945
        Returns:
937
        Returns:
946
                An error code about the execution of the function.
938
                An error code about the execution of the function.
947
        -----------------------------------------------------------------------------
939
        -----------------------------------------------------------------------------
948
        Description:
940
        Description:
949
                The function sets the release policy of the VME bus on the module.
941
                The function sets the release policy of the VME bus on the module.
950
*/
942
*/
951
CAENVME_API
943
CAENVME_API
952
CAENVME_SetReleaseType(int32_t Handle, CVReleaseTypes Value);
944
CAENVME_SetReleaseType(int32_t Handle, CVReleaseTypes Value);
953
 
945
 
954
/*
946
/*
955
        CAENVME_SetBusReqLevel
947
        CAENVME_SetBusReqLevel
956
        -----------------------------------------------------------------------------
948
        -----------------------------------------------------------------------------
957
        Parameters:
949
        Parameters:
958
                [in]  Handle    : The handle that identifies the device.
950
                [in]  Handle    : The handle that identifies the device.
959
                [in]  Value     : The type of VME bus requester priority level to set
951
                [in]  Value     : The type of VME bus requester priority level to set
960
                                  (see CVBusReqLevels enum).
952
                                  (see CVBusReqLevels enum).
961
        -----------------------------------------------------------------------------
953
        -----------------------------------------------------------------------------
962
        Returns:
954
        Returns:
963
                An error code about the execution of the function.
955
                An error code about the execution of the function.
964
        -----------------------------------------------------------------------------
956
        -----------------------------------------------------------------------------
965
        Description:
957
        Description:
966
                The function sets the specified VME bus requester priority level on
958
                The function sets the specified VME bus requester priority level on
967
                the module.
959
                the module.
968
*/
960
*/
969
CAENVME_API
961
CAENVME_API
970
CAENVME_SetBusReqLevel(int32_t Handle, CVBusReqLevels Value);
962
CAENVME_SetBusReqLevel(int32_t Handle, CVBusReqLevels Value);
971
 
963
 
972
/*
964
/*
973
        CAENVME_SetTimeout
965
        CAENVME_SetTimeout
974
        -----------------------------------------------------------------------------
966
        -----------------------------------------------------------------------------
975
        Parameters:
967
        Parameters:
976
                [in]  Handle    : The handle that identifies the device.
968
                [in]  Handle    : The handle that identifies the device.
977
                [in]  Value     : The value of VME bus timeout to set (see
969
                [in]  Value     : The value of VME bus timeout to set (see
978
                                  CVVMETimeouts enum).
970
                                  CVVMETimeouts enum).
979
        -----------------------------------------------------------------------------
971
        -----------------------------------------------------------------------------
980
        Returns:
972
        Returns:
981
                An error code about the execution of the function.
973
                An error code about the execution of the function.
982
        -----------------------------------------------------------------------------
974
        -----------------------------------------------------------------------------
983
        Description:
975
        Description:
984
                The function sets the specified VME bus timeout on the module.
976
                The function sets the specified VME bus timeout on the module.
985
*/
977
*/
986
CAENVME_API
978
CAENVME_API
987
CAENVME_SetTimeout(int32_t Handle, CVVMETimeouts Value);
979
CAENVME_SetTimeout(int32_t Handle, CVVMETimeouts Value);
988
 
980
 
989
/*
981
/*
990
        CAENVME_SetLocationMonitor
982
        CAENVME_SetLocationMonitor
991
        -----------------------------------------------------------------------------
983
        -----------------------------------------------------------------------------
992
        Parameters:
984
        Parameters:
993
                [in]  Handle    : The handle that identifies the device.
985
                [in]  Handle    : The handle that identifies the device.
994
                [in]  Address   : The addres to be monitored.
986
                [in]  Address   : The addres to be monitored.
995
                [in]  Write     : Flag to specify read or write cycle types.
987
                [in]  Write     : Flag to specify read or write cycle types.
996
                [in]  Lword     : Flag to specify long word cycle type.
988
                [in]  Lword     : Flag to specify long word cycle type.
997
                [in]  Iack      : Flag to specify interrupt acknowledge cycle type.
989
                [in]  Iack      : Flag to specify interrupt acknowledge cycle type.
998
 
990
 
999
        -----------------------------------------------------------------------------
991
        -----------------------------------------------------------------------------
1000
        Returns:
992
        Returns:
1001
                An error code about the execution of the function.
993
                An error code about the execution of the function.
1002
        -----------------------------------------------------------------------------
994
        -----------------------------------------------------------------------------
1003
        Description:
995
        Description:
1004
                The function sets the Location Monitor.
996
                The function sets the Location Monitor.
1005
*/
997
*/
1006
CAENVME_API
998
CAENVME_API
1007
CAENVME_SetLocationMonitor(int32_t Handle, uint32_t Address, CVAddressModifier Am,
999
CAENVME_SetLocationMonitor(int32_t Handle, uint32_t Address, CVAddressModifier Am,
1008
                           short Write, short Lword, short Iack);
1000
                           short Write, short Lword, short Iack);
1009
/*
1001
/*
1010
        CAENVME_SetFIFOMode
1002
        CAENVME_SetFIFOMode
1011
        -----------------------------------------------------------------------------
1003
        -----------------------------------------------------------------------------
1012
        Parameters:
1004
        Parameters:
1013
                [in]  Handle    : The handle that identifies the device.
1005
                [in]  Handle    : The handle that identifies the device.
1014
                [in]  Value     : Enable/disable the FIFO mode.
1006
                [in]  Value     : Enable/disable the FIFO mode.
1015
        -----------------------------------------------------------------------------
1007
        -----------------------------------------------------------------------------
1016
        Returns:
1008
        Returns:
1017
                An error code about the execution of the function.
1009
                An error code about the execution of the function.
1018
        -----------------------------------------------------------------------------
1010
        -----------------------------------------------------------------------------
1019
        Description:
1011
        Description:
1020
                The function enables/disables the auto increment of the VME addresses
1012
                The function enables/disables the auto increment of the VME addresses
1021
                during the block transfer cycles. With the FIFO mode enabled the
1013
                during the block transfer cycles. With the FIFO mode enabled the
1022
                addresses are not incremented.
1014
                addresses are not incremented.
1023
*/
1015
*/
1024
CAENVME_API
1016
CAENVME_API
1025
CAENVME_SetFIFOMode(int32_t Handle, short Value);
1017
CAENVME_SetFIFOMode(int32_t Handle, short Value);
1026
 
1018
 
1027
/*
1019
/*
1028
        CAENVME_GetArbiterType
1020
        CAENVME_GetArbiterType
1029
        -----------------------------------------------------------------------------
1021
        -----------------------------------------------------------------------------
1030
        Parameters:
1022
        Parameters:
1031
                [in]  Handle    : The handle that identifies the device.
1023
                [in]  Handle    : The handle that identifies the device.
1032
                [out] Value     : The type of VME bus arbitration implemented (see
1024
                [out] Value     : The type of VME bus arbitration implemented (see
1033
                                  CVArbiterTypes enum).
1025
                                  CVArbiterTypes enum).
1034
        -----------------------------------------------------------------------------
1026
        -----------------------------------------------------------------------------
1035
        Returns:
1027
        Returns:
1036
                An error code about the execution of the function.
1028
                An error code about the execution of the function.
1037
        -----------------------------------------------------------------------------
1029
        -----------------------------------------------------------------------------
1038
        Description:
1030
        Description:
1039
                The function get the type of VME bus arbiter implemented on the module.
1031
                The function get the type of VME bus arbiter implemented on the module.
1040
*/
1032
*/
1041
CAENVME_API
1033
CAENVME_API
1042
CAENVME_GetArbiterType(int32_t Handle, CVArbiterTypes *Value);
1034
CAENVME_GetArbiterType(int32_t Handle, CVArbiterTypes *Value);
1043
 
1035
 
1044
/*
1036
/*
1045
        CAENVME_GetRequesterType
1037
        CAENVME_GetRequesterType
1046
        -----------------------------------------------------------------------------
1038
        -----------------------------------------------------------------------------
1047
        Parameters:
1039
        Parameters:
1048
                [in]  Handle    : The handle that identifies the device.
1040
                [in]  Handle    : The handle that identifies the device.
1049
                [out] Value     : The type of VME bus requester implemented (see
1041
                [out] Value     : The type of VME bus requester implemented (see
1050
                                  CVRequesterTypes enum).
1042
                                  CVRequesterTypes enum).
1051
        -----------------------------------------------------------------------------
1043
        -----------------------------------------------------------------------------
1052
        Returns:
1044
        Returns:
1053
                An error code about the execution of the function.
1045
                An error code about the execution of the function.
1054
        -----------------------------------------------------------------------------
1046
        -----------------------------------------------------------------------------
1055
        Description:
1047
        Description:
1056
                The function get the type of VME bus requester implemented on the module.
1048
                The function get the type of VME bus requester implemented on the module.
1057
*/
1049
*/
1058
CAENVME_API
1050
CAENVME_API
1059
CAENVME_GetRequesterType(int32_t Handle, CVRequesterTypes *Value);
1051
CAENVME_GetRequesterType(int32_t Handle, CVRequesterTypes *Value);
1060
 
1052
 
1061
/*
1053
/*
1062
        CAENVME_GetReleaseType
1054
        CAENVME_GetReleaseType
1063
        -----------------------------------------------------------------------------
1055
        -----------------------------------------------------------------------------
1064
        Parameters:
1056
        Parameters:
1065
                [in]  Handle    : The handle that identifies the device.
1057
                [in]  Handle    : The handle that identifies the device.
1066
                [out] Value     : The type of VME bus release policy implemented (see
1058
                [out] Value     : The type of VME bus release policy implemented (see
1067
                                  CVReleaseTypes enum).
1059
                                  CVReleaseTypes enum).
1068
        -----------------------------------------------------------------------------
1060
        -----------------------------------------------------------------------------
1069
        Returns:
1061
        Returns:
1070
                An error code about the execution of the function.
1062
                An error code about the execution of the function.
1071
        -----------------------------------------------------------------------------
1063
        -----------------------------------------------------------------------------
1072
        Description:
1064
        Description:
1073
                The function get the type of VME bus release implemented on the module.
1065
                The function get the type of VME bus release implemented on the module.
1074
*/
1066
*/
1075
CAENVME_API
1067
CAENVME_API
1076
CAENVME_GetReleaseType(int32_t Handle, CVReleaseTypes *Value);
1068
CAENVME_GetReleaseType(int32_t Handle, CVReleaseTypes *Value);
1077
 
1069
 
1078
/*
1070
/*
1079
        CAENVME_GetBusReqLevel
1071
        CAENVME_GetBusReqLevel
1080
        -----------------------------------------------------------------------------
1072
        -----------------------------------------------------------------------------
1081
        Parameters:
1073
        Parameters:
1082
                [in]  Handle    : The handle that identifies the device.
1074
                [in]  Handle    : The handle that identifies the device.
1083
                [out] Value     : The type of VME bus requester priority level (see
1075
                [out] Value     : The type of VME bus requester priority level (see
1084
                                  CVBusReqLevels enum).
1076
                                  CVBusReqLevels enum).
1085
        -----------------------------------------------------------------------------
1077
        -----------------------------------------------------------------------------
1086
        Returns:
1078
        Returns:
1087
                An error code about the execution of the function.
1079
                An error code about the execution of the function.
1088
        -----------------------------------------------------------------------------
1080
        -----------------------------------------------------------------------------
1089
        Description:
1081
        Description:
1090
                The function reads the specified VME bus requester priority level on
1082
                The function reads the specified VME bus requester priority level on
1091
                the module.
1083
                the module.
1092
*/
1084
*/
1093
CAENVME_API
1085
CAENVME_API
1094
CAENVME_GetBusReqLevel(int32_t Handle, CVBusReqLevels *Value);
1086
CAENVME_GetBusReqLevel(int32_t Handle, CVBusReqLevels *Value);
1095
 
1087
 
1096
/*
1088
/*
1097
        CAENVME_GetTimeout
1089
        CAENVME_GetTimeout
1098
        -----------------------------------------------------------------------------
1090
        -----------------------------------------------------------------------------
1099
        Parameters:
1091
        Parameters:
1100
                [in]  Handle    : The handle that identifies the device.
1092
                [in]  Handle    : The handle that identifies the device.
1101
                [out] Value     : The value of VME bus timeout (see CVVMETimeouts enum).
1093
                [out] Value     : The value of VME bus timeout (see CVVMETimeouts enum).
1102
        -----------------------------------------------------------------------------
1094
        -----------------------------------------------------------------------------
1103
        Returns:
1095
        Returns:
1104
                An error code about the execution of the function.
1096
                An error code about the execution of the function.
1105
        -----------------------------------------------------------------------------
1097
        -----------------------------------------------------------------------------
1106
        Description:
1098
        Description:
1107
                The function sets the specified VME bus timeout on the module.
1099
                The function sets the specified VME bus timeout on the module.
1108
*/
1100
*/
1109
CAENVME_API
1101
CAENVME_API
1110
CAENVME_GetTimeout(int32_t Handle, CVVMETimeouts *Value);
1102
CAENVME_GetTimeout(int32_t Handle, CVVMETimeouts *Value);
1111
 
1103
 
1112
/*
1104
/*
1113
        CAENVME_GetFIFOMode
1105
        CAENVME_GetFIFOMode
1114
        -----------------------------------------------------------------------------
1106
        -----------------------------------------------------------------------------
1115
        Parameters:
1107
        Parameters:
1116
                [in]  Handle    : The handle that identifies the device.
1108
                [in]  Handle    : The handle that identifies the device.
1117
                [out] Value     : The FIFO mode read setting.
1109
                [out] Value     : The FIFO mode read setting.
1118
        -----------------------------------------------------------------------------
1110
        -----------------------------------------------------------------------------
1119
        Returns:
1111
        Returns:
1120
                An error code about the execution of the function.
1112
                An error code about the execution of the function.
1121
        -----------------------------------------------------------------------------
1113
        -----------------------------------------------------------------------------
1122
        Description:
1114
        Description:
1123
                The function read if the auto increment of the VME addresses during the
1115
                The function read if the auto increment of the VME addresses during the
1124
                block transfer cycles is enabled (0) or disabled (!=0).
1116
                block transfer cycles is enabled (0) or disabled (!=0).
1125
*/
1117
*/
1126
CAENVME_API
1118
CAENVME_API
1127
CAENVME_GetFIFOMode(int32_t Handle, short *Value);
1119
CAENVME_GetFIFOMode(int32_t Handle, short *Value);
1128
 
1120
 
1129
/*
1121
/*
1130
        CAENVME_SystemReset
1122
        CAENVME_SystemReset
1131
        -----------------------------------------------------------------------------
1123
        -----------------------------------------------------------------------------
1132
        Parameters:
1124
        Parameters:
1133
                [in]  Handle    : The handle that identifies the device.
1125
                [in]  Handle    : The handle that identifies the device.
1134
        -----------------------------------------------------------------------------
1126
        -----------------------------------------------------------------------------
1135
        Returns:
1127
        Returns:
1136
                An error code about the execution of the function.
1128
                An error code about the execution of the function.
1137
        -----------------------------------------------------------------------------
1129
        -----------------------------------------------------------------------------
1138
        Description:
1130
        Description:
1139
                The function performs a system reset on the module.
1131
                The function performs a system reset on the module.
1140
*/
1132
*/
1141
CAENVME_API
1133
CAENVME_API
1142
CAENVME_SystemReset(int32_t Handle);
1134
CAENVME_SystemReset(int32_t Handle);
1143
 
1135
 
1144
/*
1136
/*
1145
        CAENVME_ResetScalerCount
1137
        CAENVME_ResetScalerCount
1146
        -----------------------------------------------------------------------------
1138
        -----------------------------------------------------------------------------
1147
        Parameters:
1139
        Parameters:
1148
                [in]  Handle    : The handle that identifies the device.
1140
                [in]  Handle    : The handle that identifies the device.
1149
        -----------------------------------------------------------------------------
1141
        -----------------------------------------------------------------------------
1150
        Returns:
1142
        Returns:
1151
                An error code about the execution of the function.
1143
                An error code about the execution of the function.
1152
        -----------------------------------------------------------------------------
1144
        -----------------------------------------------------------------------------
1153
        Description:
1145
        Description:
1154
                The function resets the counter of the scaler..
1146
                The function resets the counter of the scaler..
1155
*/
1147
*/
1156
CAENVME_API
1148
CAENVME_API
1157
CAENVME_ResetScalerCount(int32_t Handle);
1149
CAENVME_ResetScalerCount(int32_t Handle);
1158
 
1150
 
1159
/*
1151
/*
1160
        CAENVME_EnableScalerGate
1152
        CAENVME_EnableScalerGate
1161
        -----------------------------------------------------------------------------
1153
        -----------------------------------------------------------------------------
1162
        Parameters:
1154
        Parameters:
1163
                [in]  Handle    : The handle that identifies the device.
1155
                [in]  Handle    : The handle that identifies the device.
1164
        -----------------------------------------------------------------------------
1156
        -----------------------------------------------------------------------------
1165
        Returns:
1157
        Returns:
1166
                An error code about the execution of the function.
1158
                An error code about the execution of the function.
1167
        -----------------------------------------------------------------------------
1159
        -----------------------------------------------------------------------------
1168
        Description:
1160
        Description:
1169
                The function enables the gate of the scaler.
1161
                The function enables the gate of the scaler.
1170
*/
1162
*/
1171
CAENVME_API
1163
CAENVME_API
1172
CAENVME_EnableScalerGate(int32_t Handle);
1164
CAENVME_EnableScalerGate(int32_t Handle);
1173
 
1165
 
1174
/*
1166
/*
1175
        CAENVME_DisableScalerGate
1167
        CAENVME_DisableScalerGate
1176
        -----------------------------------------------------------------------------
1168
        -----------------------------------------------------------------------------
1177
        Parameters:
1169
        Parameters:
1178
                [in]  Handle    : The handle that identifies the device.
1170
                [in]  Handle    : The handle that identifies the device.
1179
        -----------------------------------------------------------------------------
1171
        -----------------------------------------------------------------------------
1180
        Returns:
1172
        Returns:
1181
                An error code about the execution of the function.
1173
                An error code about the execution of the function.
1182
        -----------------------------------------------------------------------------
1174
        -----------------------------------------------------------------------------
1183
        Description:
1175
        Description:
1184
                The function disables the gate of the scaler.
1176
                The function disables the gate of the scaler.
1185
*/
1177
*/
1186
CAENVME_API
1178
CAENVME_API
1187
CAENVME_DisableScalerGate(int32_t Handle);
1179
CAENVME_DisableScalerGate(int32_t Handle);
1188
 
1180
 
1189
/*
1181
/*
1190
        CAENVME_StartPulser
1182
        CAENVME_StartPulser
1191
        -----------------------------------------------------------------------------
1183
        -----------------------------------------------------------------------------
1192
        Parameters:
1184
        Parameters:
1193
                [in]  Handle    : The handle that identifies the device.
1185
                [in]  Handle    : The handle that identifies the device.
1194
                [in]  PulSel    : The pulser to configure (see CVPulserSelect enum).
1186
                [in]  PulSel    : The pulser to configure (see CVPulserSelect enum).
1195
        -----------------------------------------------------------------------------
1187
        -----------------------------------------------------------------------------
1196
        Returns:
1188
        Returns:
1197
                An error code about the execution of the function.
1189
                An error code about the execution of the function.
1198
        -----------------------------------------------------------------------------
1190
        -----------------------------------------------------------------------------
1199
        Description:
1191
        Description:
1200
                The function starts the generation of pulse burst if the specified
1192
                The function starts the generation of pulse burst if the specified
1201
                pulser is configured for manual/software operation.
1193
                pulser is configured for manual/software operation.
1202
*/
1194
*/
1203
CAENVME_API
1195
CAENVME_API
1204
CAENVME_StartPulser(int32_t Handle, CVPulserSelect PulSel);
1196
CAENVME_StartPulser(int32_t Handle, CVPulserSelect PulSel);
1205
 
1197
 
1206
/*
1198
/*
1207
        CAENVME_StopPulser
1199
        CAENVME_StopPulser
1208
        -----------------------------------------------------------------------------
1200
        -----------------------------------------------------------------------------
1209
        Parameters:
1201
        Parameters:
1210
                [in]  Handle    : The handle that identifies the device.
1202
                [in]  Handle    : The handle that identifies the device.
1211
                [in]  PulSel    : The pulser to configure (see CVPulserSelect enum).
1203
                [in]  PulSel    : The pulser to configure (see CVPulserSelect enum).
1212
        -----------------------------------------------------------------------------
1204
        -----------------------------------------------------------------------------
1213
        Returns:
1205
        Returns:
1214
                An error code about the execution of the function.
1206
                An error code about the execution of the function.
1215
        -----------------------------------------------------------------------------
1207
        -----------------------------------------------------------------------------
1216
        Description:
1208
        Description:
1217
                The function stops the generation of pulse burst if the specified
1209
                The function stops the generation of pulse burst if the specified
1218
                pulser is configured for manual/software operation.
1210
                pulser is configured for manual/software operation.
1219
*/
1211
*/
1220
CAENVME_API
1212
CAENVME_API
1221
CAENVME_StopPulser(int32_t Handle, CVPulserSelect PulSel);
1213
CAENVME_StopPulser(int32_t Handle, CVPulserSelect PulSel);
1222
 
1214
 
1223
/*
1215
/*
1224
        CAENVME_WriteFlashPage
1216
        CAENVME_WriteFlashPage
1225
        -----------------------------------------------------------------------------
1217
        -----------------------------------------------------------------------------
1226
        Parameters:
1218
        Parameters:
1227
                [in]  Handle    : The handle that identifies the device.
1219
                [in]  Handle    : The handle that identifies the device.
1228
                [in]  Data      : The data to write.
1220
                [in]  Data      : The data to write.
1229
                [in]  PageNum   : The flash page number to write.
1221
                [in]  PageNum   : The flash page number to write.
1230
        -----------------------------------------------------------------------------
1222
        -----------------------------------------------------------------------------
1231
        Returns:
1223
        Returns:
1232
                An error code about the execution of the function.
1224
                An error code about the execution of the function.
1233
        -----------------------------------------------------------------------------
1225
        -----------------------------------------------------------------------------
1234
        Description:
1226
        Description:
1235
                The function writes the data into the specified flash page.
1227
                The function writes the data into the specified flash page.
1236
*/
1228
*/
1237
CAENVME_API
1229
CAENVME_API
1238
CAENVME_WriteFlashPage(int32_t Handle, unsigned char *Data, int PageNum);
1230
CAENVME_WriteFlashPage(int32_t Handle, unsigned char *Data, int PageNum);
1239
 
1231
 
1240
/*
1232
/*
1241
        CAENVME_ReadFlashPage
1233
        CAENVME_ReadFlashPage
1242
        -----------------------------------------------------------------------------
1234
        -----------------------------------------------------------------------------
1243
        Parameters:
1235
        Parameters:
1244
                [in]  Handle    : The handle that identifies the device.
1236
                [in]  Handle    : The handle that identifies the device.
1245
                [out] Data      : The data to write.
1237
                [out] Data      : The data to write.
1246
                [in]  PageNum   : The flash page number to write.
1238
                [in]  PageNum   : The flash page number to write.
1247
        -----------------------------------------------------------------------------
1239
        -----------------------------------------------------------------------------
1248
        Returns:
1240
        Returns:
1249
                An error code about the execution of the function.
1241
                An error code about the execution of the function.
1250
        -----------------------------------------------------------------------------
1242
        -----------------------------------------------------------------------------
1251
        Description:
1243
        Description:
1252
                The function reads the data from the specified flash page.
1244
                The function reads the data from the specified flash page.
1253
*/
1245
*/
1254
CAENVME_API
1246
CAENVME_API
1255
CAENVME_ReadFlashPage(int32_t Handle, unsigned char *Data, int PageNum);
1247
CAENVME_ReadFlashPage(int32_t Handle, unsigned char *Data, int PageNum);
1256
 
1248
 
1257
/*
1249
/*
1258
        CAENVME_EraseFlashPage
1250
        CAENVME_EraseFlashPage
1259
        -----------------------------------------------------------------------------
1251
        -----------------------------------------------------------------------------
1260
        Parameters:
1252
        Parameters:
1261
                [in]  Handle    : The handle that identifies the device.
1253
                [in]  Handle    : The handle that identifies the device.
1262
                [in]  PageNum   : The flash page number to write.
1254
                [in]  PageNum   : The flash page number to write.
1263
        -----------------------------------------------------------------------------
1255
        -----------------------------------------------------------------------------
1264
        Returns:
1256
        Returns:
1265
                An error code about the execution of the function.
1257
                An error code about the execution of the function.
1266
        -----------------------------------------------------------------------------
1258
        -----------------------------------------------------------------------------
1267
        Description:
1259
        Description:
1268
                The function erases the specified flash page.
1260
                The function erases the specified flash page.
1269
*/
1261
*/
1270
CAENVME_API
1262
CAENVME_API
1271
CAENVME_EraseFlashPage(int32_t Handle, int Pagenum);
1263
CAENVME_EraseFlashPage(int32_t Handle, int Pagenum);
1272
 
1264
 
1273
#ifdef LINUX
1265
#ifdef LINUX
1274
/*
1266
/*
1275
        CAENVME_BLTReadAsync
1267
        CAENVME_BLTReadAsync
1276
        -----------------------------------------------------------------------------
1268
        -----------------------------------------------------------------------------
1277
        Parameters:
1269
        Parameters:
1278
                [in]  Handle    : The handle that identifies the device.
1270
                [in]  Handle    : The handle that identifies the device.
1279
                [in]  Address   : The VME bus address.
1271
                [in]  Address   : The VME bus address.
1280
                [out] Buffer    : The data read from the VME bus.
1272
                [out] Buffer    : The data read from the VME bus.
1281
                [in]  Size      : The size of the transfer in bytes.
1273
                [in]  Size      : The size of the transfer in bytes.
1282
                [in]  AM        : The address modifier (see CVAddressModifier enum).
1274
                [in]  AM        : The address modifier (see CVAddressModifier enum).
1283
                [in]  DW        : The data width.(see CVDataWidth enum).
1275
                [in]  DW        : The data width.(see CVDataWidth enum).
1284
        -----------------------------------------------------------------------------
1276
        -----------------------------------------------------------------------------
1285
        Returns:
1277
        Returns:
1286
                An error code about the execution of the function.
1278
                An error code about the execution of the function.
1287
        -----------------------------------------------------------------------------
1279
        -----------------------------------------------------------------------------
1288
        Description:
1280
        Description:
1289
                The function starts a VME block transfer read cycle. It can be used
1281
                The function starts a VME block transfer read cycle. It can be used
1290
                to perform MBLT transfers using 64 bit data width.
1282
                to perform MBLT transfers using 64 bit data width.
1291
                This function cannot be used with the V1718 USB bridge.
1283
                This function cannot be used with the V1718 USB bridge.
1292
                This function can be used only on Linux platforms.
1284
                This function can be used only on Linux platforms.
1293
                Take care to call the CAENVME_BLTReadWait function before any other
1285
                Take care to call the CAENVME_BLTReadWait function before any other
1294
                call to a CAENVMElib function with the same handle.
1286
                call to a CAENVMElib function with the same handle.
1295
*/
1287
*/
1296
CAENVME_API
1288
CAENVME_API
1297
CAENVME_BLTReadAsync(int32_t Handle, uint32_t Address, void *Buffer,
1289
CAENVME_BLTReadAsync(int32_t Handle, uint32_t Address, void *Buffer,
1298
                     int Size, CVAddressModifier AM, CVDataWidth DW);
1290
                     int Size, CVAddressModifier AM, CVDataWidth DW);
1299
 
1291
 
1300
/*
1292
/*
1301
        CAENVME_BLTReadWait
1293
        CAENVME_BLTReadWait
1302
        -----------------------------------------------------------------------------
1294
        -----------------------------------------------------------------------------
1303
        Parameters:
1295
        Parameters:
1304
                [in]  Handle    : The handle that identifies the device.
1296
                [in]  Handle    : The handle that identifies the device.
1305
                [out] Count     : The number of bytes transferred.
1297
                [out] Count     : The number of bytes transferred.
1306
        -----------------------------------------------------------------------------
1298
        -----------------------------------------------------------------------------
1307
        Returns:
1299
        Returns:
1308
                An error code about the execution of the function.
1300
                An error code about the execution of the function.
1309
        -----------------------------------------------------------------------------
1301
        -----------------------------------------------------------------------------
1310
        Description:
1302
        Description:
1311
                The function wait for the completion of a VME block transfer read
1303
                The function wait for the completion of a VME block transfer read
1312
                cycle started with the CAENVME_BLTReadAsync function call.
1304
                cycle started with the CAENVME_BLTReadAsync function call.
1313
                This function cannot be used with the V1718 USB bridge.
1305
                This function cannot be used with the V1718 USB bridge.
1314
                This function can be used only on Linux platforms.
1306
                This function can be used only on Linux platforms.
1315
*/
1307
*/
1316
CAENVME_API
1308
CAENVME_API
1317
CAENVME_BLTReadWait(int32_t Handle, int *Count);
1309
CAENVME_BLTReadWait(int32_t Handle, int *Count);
1318
 
1310
 
1319
#endif
1311
#endif
1320
 
1312
 
1321
#ifdef __cplusplus
1313
#ifdef __cplusplus
1322
}
1314
}
1323
#endif // __cplusplus
1315
#endif // __cplusplus
1324
 
1316
 
1325
#endif // __CAENVMELIB_H
1317
#endif // __CAENVMELIB_H
1326
 
1318