Subversion Repositories f9daq

Rev

Details | Last modification | View Log | RSS feed

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