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