CAENVMElib.h

00001 
00016 #ifndef __CAENVMELIB_H
00017 #define __CAENVMELIB_H
00018 
00019 #include <stdio.h>
00020 // Rev. 2.5
00021 #ifdef LINUX
00022         #include <stdint.h>
00023 #endif
00024 #include <stdlib.h>
00025 #include <malloc.h>
00026 #include "CAENVMEoslib.h"
00027 #include "CAENVMEtypes.h"
00028 
00029 #ifdef WIN32
00030         typedef INT32  int32_t;
00031         typedef UINT32 uint32_t;
00032         typedef INT64  int64_t;
00033         typedef UINT64 uint64_t;
00034 #endif
00035 
00036 #ifdef __cplusplus
00037 extern "C" {
00038 #endif // __cplusplus
00039 /*
00040         CAENVME_DecodeError
00041         -----------------------------------------------------------------------------
00042         Parameters:
00043                 [in]  Code      : The error code to decode.
00044         -----------------------------------------------------------------------------
00045         Returns:
00046                 An string describing the error condition.
00047         -----------------------------------------------------------------------------
00048         Description:
00049                 Decode the error.
00050 */
00051 const char *
00052 #ifdef WIN32
00053 __stdcall
00054 #endif
00055 CAENVME_DecodeError(CVErrorCodes Code);
00056 
00057 /*
00058         CAENVME_API CAENVME_SWRelease
00059         -----------------------------------------------------------------------------
00060         Parameters:
00061                 [out] SwRel     : Returns the software release of the library.
00062         -----------------------------------------------------------------------------
00063         Returns:
00064                 An error code about the execution of the function.
00065         -----------------------------------------------------------------------------
00066         Description:
00067                 Permits to read the software release of the library.
00068 */
00069 CAENVME_API
00070 CAENVME_SWRelease(char *SwRel);
00071 
00072 /*
00073         CAENVME_BoardFWRelease.
00074         -----------------------------------------------------------------------------
00075         Parameters:
00076                 [in]  Handle    : The handle that identifies the device.
00077                 [out] FWRel     : Returns the firmware release of the device.
00078         -----------------------------------------------------------------------------
00079         Returns:
00080                 An error code about the execution of the function.
00081         -----------------------------------------------------------------------------
00082         Description:
00083                 Permits to read the firmware release loaded into the device.
00084 */
00085 CAENVME_API
00086 CAENVME_BoardFWRelease(int32_t Handle, char *FWRel);
00087 
00088 /*
00089         CAENVME_DriverRelease.
00090         -----------------------------------------------------------------------------
00091         Parameters:
00092                 [in]  Handle    : The handle that identifies the device.
00093                 [out] Rel       : Returns the software release of the device driver
00094         -----------------------------------------------------------------------------
00095         Returns:
00096                 An error code about the execution of the function.
00097         -----------------------------------------------------------------------------
00098         Description:
00099                 Permits to read the software release of the device driver.
00100 */
00101 CAENVME_API
00102 CAENVME_DriverRelease(int32_t Handle, char *Rel);
00103 
00104 /*
00105         CAENVME_DeviceReset
00106         -----------------------------------------------------------------------------
00107         Parameters:
00108                 [in]  Handle    : The handle that identifies the device.
00109         -----------------------------------------------------------------------------
00110         Returns:
00111                 An error code about the execution of the function.
00112         -----------------------------------------------------------------------------
00113         Description:
00114                 Permits to reset the device.
00115                 Implemented for A2818, A2719, V2718 on Linux platform only 
00116 */
00117 CAENVME_API
00118 CAENVME_DeviceReset(int32_t dev);
00119 
00120 
00121 /*
00122         CAENVME_Init
00123         -----------------------------------------------------------------------------
00124         Parameters:
00125                 [in]  BdType    : The model of the bridge (V1718/V2718).
00126                 [in]  Link      : The link number (don't care for V1718).
00127                 [in]  BdNum     : The board number in the link.
00128                 [out] Handle    : The handle that identifies the device.
00129         -----------------------------------------------------------------------------
00130         Returns:
00131                 An error code about the execution of the function.
00132         -----------------------------------------------------------------------------
00133         Description:
00134                 The function generates an opaque handle to identify a module
00135                 attached to the PC. In the case of V1718 bridge it must be
00136                 specified only the module index (BdNum) because the link is USB.
00137                 In the case of V2718 it must be specified also the link because
00138                 you can have some A2818 optical link inside the PC.
00139 */
00140 CAENVME_API
00141 CAENVME_Init(CVBoardTypes BdType, short Link, short BdNum, int32_t *Handle);
00142 
00143 /*
00144         CAENVME_End
00145         -----------------------------------------------------------------------------
00146         Parameters:
00147                 [in]  Handle    : The handle that identifies the device.
00148         -----------------------------------------------------------------------------
00149         Returns:
00150                 An error code about the execution of the function.
00151         -----------------------------------------------------------------------------
00152         Description:
00153                 Notifies the library the end of work and free the allocated
00154                 resources.
00155 */
00156 CAENVME_API
00157 CAENVME_End(int32_t Handle);
00158 
00159 /*
00160         CAENVME_ReadCycle
00161         -----------------------------------------------------------------------------
00162         Parameters:
00163                 [in]  Handle    : The handle that identifies the device.
00164                 [in]  Address   : The VME bus address.
00165                 [out] Data      : The data read from the VME bus.
00166                 [in]  AM        : The address modifier (see CVAddressModifier enum).
00167                 [in]  DW        : The data width.(see CVDataWidth enum).
00168         -----------------------------------------------------------------------------
00169         Returns:
00170                 An error code about the execution of the function.
00171         -----------------------------------------------------------------------------
00172         Description:
00173                 The function performs a single VME read cycle.
00174 */
00175 CAENVME_API
00176 CAENVME_ReadCycle(int32_t Handle, uint32_t Address, void *Data,
00177                   CVAddressModifier AM, CVDataWidth DW);
00178 
00179 /*
00180         CAENVME_RMWCycle
00181         -----------------------------------------------------------------------------
00182         Parameters:
00183                 [in]     Handle : The handle that identifies the device.
00184                 [in]     Address: The VME bus address.
00185                 [in/out] Data   : The data read and then written to the VME bus.
00186                 [in]     AM     : The address modifier (see CVAddressModifier enum).
00187                 [in]     DW     : The data width.(see CVDataWidth enum).
00188         -----------------------------------------------------------------------------
00189         Returns:
00190                 An error code about the execution of the function.
00191         -----------------------------------------------------------------------------
00192         Description:
00193                 The function performs a Read-Modify-Write cycle. The Data parameter
00194                 is bidirectional: it is used to write the value to the VME bus and to
00195                 return the value read.
00196 */
00197 CAENVME_API
00198 CAENVME_RMWCycle(int32_t Handle, uint32_t Address,  void *Data,
00199                  CVAddressModifier AM, CVDataWidth DW);
00200 
00201 /*
00202         CAENVME_WriteCycle
00203         -----------------------------------------------------------------------------
00204         Parameters:
00205                 [in]  Handle    : The handle that identifies the device.
00206                 [in]  Address   : The VME bus address.
00207                 [in]  Data      : The data written to the VME bus.
00208                 [in]  AM        : The address modifier (see CVAddressModifier enum).
00209                 [in]  DW        : The data width.(see CVDataWidth enum).
00210         -----------------------------------------------------------------------------
00211         Returns:
00212                 An error code about the execution of the function.
00213         -----------------------------------------------------------------------------
00214         Description:
00215                 The function performs a single VME write cycle.
00216 */
00217 CAENVME_API
00218 CAENVME_WriteCycle(int32_t Handle, uint32_t Address, void *Data,
00219                    CVAddressModifier AM, CVDataWidth DW);
00220 
00221 /*
00222         CAENVME_MultiRead (Ver. 2.2)
00223         -----------------------------------------------------------------------------
00224         Parameters:
00225                 [in]  Handle    : The handle that identifies the device.
00226                 [in]  Addrs     : The VME bus addresses.
00227                 [out] Buffer    : The data read from the VME bus.
00228                 [in]  NCycles   : The number of read cycles to perform.
00229                 [in]  AMs       : The address modifiers (see CVAddressModifier enum).
00230                 [in]  DWs       : The data widths.(see CVDataWidth enum).
00231                 [out] ECs       : The error codes relaive to each cycle.
00232         -----------------------------------------------------------------------------
00233         Returns:
00234                 An error code about the execution of the function.
00235         -----------------------------------------------------------------------------
00236         Description:
00237                 The function performs a block of single VME read cycles.
00238 */
00239 CAENVME_API
00240 CAENVME_MultiRead(int32_t Handle, uint32_t *Addrs, uint32_t *Buffer,
00241         int NCycles, CVAddressModifier *AMs, CVDataWidth *DWs, CVErrorCodes *ECs);
00242 
00243 /*
00244         CAENVME_MultiWrite (Ver. 2.2)
00245         -----------------------------------------------------------------------------
00246         Parameters:
00247                 [in]  Handle    : The handle that identifies the device.
00248                 [in]  Addrs     : The VME bus addresses.
00249                 [in]  Buffer    : The data to write to the VME bus.
00250                 [in]  NCycles   : The number of read cycles to perform.
00251                 [in]  AMs       : The address modifiers (see CVAddressModifier enum).
00252                 [in]  DWs       : The data widths.(see CVDataWidth enum).
00253                 [out] ECs       : The error codes relaive to each cycle.
00254         -----------------------------------------------------------------------------
00255         Returns:
00256                 An error code about the execution of the function.
00257         -----------------------------------------------------------------------------
00258         Description:
00259                 The function performs a block of single VME write cycles.
00260 */
00261 CAENVME_API
00262 CAENVME_MultiWrite(int32_t Handle, uint32_t *Addrs, uint32_t *Buffer,
00263         int NCycles, CVAddressModifier *AMs, CVDataWidth *DWs, CVErrorCodes *ECs);
00264 
00265 /*
00266         CAENVME_BLTReadCycle
00267         -----------------------------------------------------------------------------
00268         Parameters:
00269                 [in]  Handle    : The handle that identifies the device.
00270                 [in]  Address   : The VME bus address.
00271                 [out] Buffer    : The data read from the VME bus.
00272                 [in]  Size      : The size of the transfer in bytes.
00273                 [in]  AM        : The address modifier (see CVAddressModifier enum).
00274                 [in]  DW        : The data width.(see CVDataWidth enum).
00275                 [out] count     : The number of bytes transferred.
00276         -----------------------------------------------------------------------------
00277         Returns:
00278                 An error code about the execution of the function.
00279         -----------------------------------------------------------------------------
00280         Description:
00281                 The function performs a VME block transfer read cycle. It can be used to
00282                 perform MBLT transfers using 64 bit data width.
00283 */
00284 CAENVME_API
00285 CAENVME_BLTReadCycle(int32_t Handle, uint32_t Address, void *Buffer,
00286                      int Size, CVAddressModifier AM, CVDataWidth DW, int *count);
00287 
00288 /*
00289         Ver. 2.3 - New function
00290 
00291         CAENVME_FIFOBLTReadCycle
00292         -----------------------------------------------------------------------------
00293         Parameters:
00294                 [in]  Handle    : The handle that identifies the device.
00295                 [in]  Address   : The VME bus address.
00296                 [out] Buffer    : The data read from the VME bus.
00297                 [in]  Size      : The size of the transfer in bytes.
00298                 [in]  AM        : The address modifier (see CVAddressModifier enum).
00299                 [in]  DW        : The data width.(see CVDataWidth enum).
00300                 [out] count     : The number of bytes transferred.
00301         -----------------------------------------------------------------------------
00302         Returns:
00303                 An error code about the execution of the function.
00304         -----------------------------------------------------------------------------
00305         Description:
00306                 The function performs a VME block transfer read cycle. It can be used to
00307                 perform MBLT transfers using 64 bit data width. The Address is not 
00308                 incremented on the VMEBus during the cycle. 
00309 */
00310 CAENVME_API
00311 CAENVME_FIFOBLTReadCycle(int32_t Handle, uint32_t Address, void *Buffer,
00312                          int Size, CVAddressModifier AM, CVDataWidth DW, int *count);
00313 
00314 /*
00315         CAENVME_MBLTReadCycle
00316         -----------------------------------------------------------------------------
00317         Parameters:
00318                 [in]  Handle    : The handle that identifies the device.
00319                 [in]  Address   : The VME bus address.
00320                 [out] Buffer    : The data read from the VME bus.
00321                 [in]  Size      : The size of the transfer in bytes.
00322                 [in]  AM        : The address modifier (see CVAddressModifier enum).
00323                 [out] count     : The number of bytes transferred.
00324         -----------------------------------------------------------------------------
00325         Returns:
00326                 An error code about the execution of the function.
00327         -----------------------------------------------------------------------------
00328         Description:
00329                 The function performs a VME multiplexed block transfer read cycle.
00330 */
00331 CAENVME_API
00332 CAENVME_MBLTReadCycle(int32_t Handle, uint32_t Address, void *Buffer,
00333                       int Size, CVAddressModifier AM, int *count);
00334 
00335 /*
00336         Ver. 2.3 - New function
00337         
00338         CAENVME_FIFOMBLTReadCycle
00339         -----------------------------------------------------------------------------
00340         Parameters:
00341                 [in]  Handle    : The handle that identifies the device.
00342                 [in]  Address   : The VME bus address.
00343                 [out] Buffer    : The data read from the VME bus.
00344                 [in]  Size      : The size of the transfer in bytes.
00345                 [in]  AM        : The address modifier (see CVAddressModifier enum).
00346                 [out] count     : The number of bytes transferred.
00347         -----------------------------------------------------------------------------
00348         Returns:
00349                 An error code about the execution of the function.
00350         -----------------------------------------------------------------------------
00351         Description:
00352                 The function performs a VME multiplexed block transfer read cycle.
00353                 The Address is not incremented on the VMEBus during the cycle. 
00354 */
00355 CAENVME_API
00356 CAENVME_FIFOMBLTReadCycle(int32_t Handle, uint32_t Address, void *Buffer,
00357                           int Size, CVAddressModifier AM, int *count);
00358 
00359 /*
00360         CAENVME_BLTWriteCycle
00361         -----------------------------------------------------------------------------
00362         Parameters:
00363                 [in]  Handle    : The handle that identifies the device.
00364                 [in]  Address   : The VME bus address.
00365                 [in]  Buffer    : The data to be written to the VME bus.
00366                 [in]  Size      : The size of the transfer in bytes.
00367                 [in]  AM        : The address modifier (see CVAddressModifier enum).
00368                 [in]  DW        : The data width.(see CVDataWidth enum).
00369                 [out] count     : The number of bytes transferred.
00370         -----------------------------------------------------------------------------
00371         Returns:
00372                 An error code about the execution of the function.
00373         -----------------------------------------------------------------------------
00374         Description:
00375                 The function performs a VME block transfer write cycle.
00376 */
00377 CAENVME_API
00378 CAENVME_BLTWriteCycle(int32_t Handle, uint32_t Address, void *Buffer,
00379                       int size, CVAddressModifier AM, CVDataWidth DW, int *count);
00380 
00381 /*
00382         Ver. 2.3 - New function
00383 
00384         CAENVME_FIFOBLTWriteCycle
00385         -----------------------------------------------------------------------------
00386         Parameters:
00387                 [in]  Handle    : The handle that identifies the device.
00388                 [in]  Address   : The VME bus address.
00389                 [in]  Buffer    : The data to be written to the VME bus.
00390                 [in]  Size      : The size of the transfer in bytes.
00391                 [in]  AM        : The address modifier (see CVAddressModifier enum).
00392                 [in]  DW        : The data width.(see CVDataWidth enum).
00393                 [out] count     : The number of bytes transferred.
00394         -----------------------------------------------------------------------------
00395         Returns:
00396                 An error code about the execution of the function.
00397         -----------------------------------------------------------------------------
00398         Description:
00399                 The function performs a VME block transfer write cycle. The address
00400                 is not incremented during the cycle.
00401 */
00402 CAENVME_API
00403 CAENVME_FIFOBLTWriteCycle(int32_t Handle, uint32_t Address, void *Buffer,
00404                       int size, CVAddressModifier AM, CVDataWidth DW, int *count);
00405 
00406 /*
00407         CAENVME_MBLTWriteCycle
00408         -----------------------------------------------------------------------------
00409         Parameters:
00410                 [in]  Handle    : The handle that identifies the device.
00411                 [in]  Address   : The VME bus address.
00412                 [in]  Buffer    : The data to be written to the VME bus.
00413                 [in]  Size      : The size of the transfer in bytes.
00414                 [in]  AM        : The address modifier (see CVAddressModifier enum).
00415                 [out] count     : The number of bytes transferred.
00416         -----------------------------------------------------------------------------
00417         Returns:
00418                 An error code about the execution of the function.
00419         -----------------------------------------------------------------------------
00420         Description:
00421                 The function performs a VME multiplexed block transfer write cycle.
00422 */
00423 CAENVME_API
00424 CAENVME_MBLTWriteCycle(int32_t Handle, uint32_t Address, void *Buffer,
00425                        int size, CVAddressModifier AM, int *count);
00426 
00427 /*
00428         Ver. 2.3 - New function
00429         
00430         CAENVME_FIFOMBLTWriteCycle
00431         -----------------------------------------------------------------------------
00432         Parameters:
00433                 [in]  Handle    : The handle that identifies the device.
00434                 [in]  Address   : The VME bus address.
00435                 [in]  Buffer    : The data to be written to the VME bus.
00436                 [in]  Size      : The size of the transfer in bytes.
00437                 [in]  AM        : The address modifier (see CVAddressModifier enum).
00438                 [out] count     : The number of bytes transferred.
00439         -----------------------------------------------------------------------------
00440         Returns:
00441                 An error code about the execution of the function.
00442         -----------------------------------------------------------------------------
00443         Description:
00444                 The function performs a VME multiplexed block transfer write cycle.
00445                 The address is not incremented during the cycle.
00446 */
00447 CAENVME_API
00448 CAENVME_FIFOMBLTWriteCycle(int32_t Handle, uint32_t Address, void *Buffer,
00449                            int size, CVAddressModifier AM, int *count);
00450 
00451 /*
00452         CAENVME_ADOCycle
00453         -----------------------------------------------------------------------------
00454         Parameters:
00455                 [in]  Handle    : The handle that identifies the device.
00456                 [in]  Address   : The VME bus address.
00457                 [in]  AM        : The address modifier (see CVAddressModifier enum).
00458         -----------------------------------------------------------------------------
00459         Returns:
00460                 An error code about the execution of the function.
00461         -----------------------------------------------------------------------------
00462         Description:
00463                 The function performs a VME address only cycle. It can be used to
00464                 perform MBLT transfers using 64 bit data width.
00465 */
00466 CAENVME_API
00467 CAENVME_ADOCycle(int32_t Handle, uint32_t Address, CVAddressModifier AM);
00468 
00469 /*
00470         CAENVME_ADOHCycle
00471         -----------------------------------------------------------------------------
00472         Parameters:
00473                 [in]  Handle    : The handle that identifies the device.
00474                 [in]  Address   : The VME bus address.
00475                 [in]  AM        : The address modifier (see CVAddressModifier enum).
00476         -----------------------------------------------------------------------------
00477         Returns:
00478                 An error code about the execution of the function.
00479         -----------------------------------------------------------------------------
00480         Description:
00481                 The function performs a VME address only with handshake cycle.
00482 */
00483 CAENVME_API
00484 CAENVME_ADOHCycle(int32_t Handle, uint32_t Address, CVAddressModifier AM);
00485 
00486 /*
00487         CAENVME_IACKCycle
00488         -----------------------------------------------------------------------------
00489         Parameters:
00490                 [in]  Handle    : The handle that identifies the device.
00491                 [in]  Level     : The IRQ level to acknowledge (see CVIRQLevels enum).
00492                 [in]  DW        : The data width.(see CVDataWidth enum).
00493         -----------------------------------------------------------------------------
00494         Returns:
00495                 An error code about the execution of the function.
00496         -----------------------------------------------------------------------------
00497         Description:
00498                 The function performs a VME interrupt acknowledge cycle.
00499 */
00500 CAENVME_API
00501 CAENVME_IACKCycle(int32_t Handle, CVIRQLevels Level, void *Vector, CVDataWidth DW);
00502 
00503 /*
00504         CAENVME_IRQCheck
00505         -----------------------------------------------------------------------------
00506         Parameters:
00507                 [in]  Handle    : The handle that identifies the device.
00508                 [out] Mask      : A bit-mask indicating the active IRQ lines.
00509         -----------------------------------------------------------------------------
00510         Returns:
00511                 An error code about the execution of the function.
00512         -----------------------------------------------------------------------------
00513         Description:
00514                 The function returns a bit mask indicating the active IRQ lines.
00515 */
00516 CAENVME_API
00517 CAENVME_IRQCheck(int32_t Handle, CAEN_BYTE *Mask);
00518 
00519 /*
00520         CAENVME_IRQEnable
00521         -----------------------------------------------------------------------------
00522         Parameters:
00523                 [in]  Handle    : The handle that identifies the device.
00524                 [in]  Mask      : A bit-mask indicating the IRQ lines.
00525         -----------------------------------------------------------------------------
00526         Returns:
00527                 An error code about the execution of the function.
00528         -----------------------------------------------------------------------------
00529         Description:
00530                 The function enables the IRQ lines specified by Mask.
00531 */
00532 CAENVME_API
00533 CAENVME_IRQEnable(int32_t Handle, uint32_t Mask);
00534 
00535 /*
00536         CAENVME_IRQDisable
00537         -----------------------------------------------------------------------------
00538         Parameters:
00539                 [in]  Handle    : The handle that identifies the device.
00540                 [in]  Mask      : A bit-mask indicating the IRQ lines.
00541         -----------------------------------------------------------------------------
00542         Returns:
00543                 An error code about the execution of the function.
00544         -----------------------------------------------------------------------------
00545         Description:
00546                 The function disables the IRQ lines specified by Mask.
00547 */
00548 CAENVME_API
00549 CAENVME_IRQDisable(int32_t Handle, uint32_t Mask);
00550 
00551 /*
00552         CAENVME_IRQWait
00553         -----------------------------------------------------------------------------
00554         Parameters:
00555                 [in]  Handle    : The handle that identifies the device.
00556                 [in]  Mask      : A bit-mask indicating the IRQ lines.
00557                 [in]  Timeout   : Timeout in milliseconds.
00558         -----------------------------------------------------------------------------
00559         Returns:
00560                 An error code about the execution of the function.
00561         -----------------------------------------------------------------------------
00562         Description:
00563                 The function wait the IRQ lines specified by Mask until one of
00564                 them raise or timeout expires.
00565 */
00566 CAENVME_API
00567 CAENVME_IRQWait(int32_t Handle, uint32_t Mask, uint32_t Timeout);
00568 
00569 /*
00570         CAENVME_SetPulserConf
00571         -----------------------------------------------------------------------------
00572         Parameters:
00573                 [in]  Handle    : The handle that identifies the device.
00574                 [in]  PulSel    : The pulser to configure (see CVPulserSelect enum).
00575                 [in]  Period    : The period of the pulse in time units.
00576                 [in]  Width     : The width of the pulse in time units.
00577                 [in]  Unit      : The time unit for the pulser configuration (see
00578                                   CVTimeUnits enum).
00579                 [in]  PulseNo   : The number of pulses to generate (0 = infinite).
00580                 [in]  Start     : The source signal to start the pulse burst (see
00581                                   CVIOSources enum).
00582                 [in]  Reset     : The source signal to stop the pulse burst (see
00583                                   CVIOSources enum).
00584         -----------------------------------------------------------------------------
00585         Returns:
00586                 An error code about the execution of the function.
00587         -----------------------------------------------------------------------------
00588         Description:
00589                 The function permits to configure the pulsers. All the timing parameters
00590                 are expressed in the time units specified. The start signal source can be
00591                 one of: front panel button or software (cvManualSW), input signal 0
00592                 (cvInputSrc0),input signal 1 (cvInputSrc1) or input coincidence
00593                 (cvCoincidence). The reset signal source can be: front panel button or
00594                 software (cvManualSW) or, for pulser A the input signal 0 (cvInputSrc0),
00595                 for pulser B the input signal 1 (cvInputSrc1).
00596 */
00597 CAENVME_API
00598 CAENVME_SetPulserConf(int32_t Handle, CVPulserSelect PulSel, unsigned char Period,
00599                       unsigned char Width, CVTimeUnits Unit, unsigned char PulseNo,
00600                       CVIOSources Start, CVIOSources Reset);
00601 
00602 /*
00603         CAENVME_SetScalerConf
00604         -----------------------------------------------------------------------------
00605         Parameters:
00606                 [in]  Handle    : The handle that identifies the device.
00607                 [in]  Limit     : The counter limit for the scaler.
00608                 [in]  AutoReset : Enable/disable the counter auto reset.
00609                 [in]  Hit       : The source signal for the signal to count (see
00610                                   CVIOSources enum).
00611                 [in]  Gate      : The source signal for the gate (see CVIOSources enum).
00612                 [in]  Reset     : The source signal to stop the counter (see
00613                                   CVIOSources enum).
00614         -----------------------------------------------------------------------------
00615         Returns:
00616                 An error code about the execution of the function.
00617         -----------------------------------------------------------------------------
00618         Description:
00619                 The function permits to configure the scaler. Limit range is 0 - 1024
00620                 (10 bit). The hit signal source can be: input signal 0 (cvInputSrc0)
00621                 or input coincidence (cvCoincidence). The gate signal source can be:
00622                 front panel button or software (cvManualSW) or input signal 1
00623                 (cvInputSrc1). The reset signal source can be: front panel button or
00624                 software (cvManualSW) or input signal 1 (cvInputSrc1).
00625 */
00626 CAENVME_API
00627 CAENVME_SetScalerConf(int32_t Handle, short Limit, short AutoReset,
00628                       CVIOSources Hit, CVIOSources Gate, CVIOSources Reset);
00629 
00630 /*
00631         CAENVME_SetOutputConf
00632         -----------------------------------------------------------------------------
00633         Parameters:
00634                 [in]  Handle    : The handle that identifies the device.
00635                 [in]  OutSel    : The output line to configure (see CVOutputSelect
00636                                   enum).
00637                 [in]  OutPol    : The output line polarity (see CVIOPolarity enum).
00638                 [in]  LEDPol    : The output LED polarity (see CVLEDPolarity enum).
00639                 [in]  Source    : The source signal to propagate to the output line
00640                                   (see CVIOSources enum).
00641         -----------------------------------------------------------------------------
00642         Returns:
00643                 An error code about the execution of the function.
00644         -----------------------------------------------------------------------------
00645         Description:
00646                 The function permits to configure the output lines of the module. It
00647                 can be specified the polarity for the line and for the LED. The
00648                 output line source depends on the line as figured out by the
00649                 following table:
00650 
00651                 +-----------------------------------------------------------+
00652                 !           S O U R C E      S E L E C T I O N              !
00653                 +--------------+---------------+---------------+------------+
00654                 ! cvVMESignals ! cvCoincidence ! cvMiscSignals ! cvManualSW !
00655         +---+---+--------------+---------------+---------------+------------+
00656         !   ! 0 !      DS      ! Input Coinc.  !   Pulser A    ! Manual/SW  !
00657         ! O +---+--------------+---------------+---------------+------------+
00658         ! U ! 1 !      AS      ! Input Coinc.  !   Pulser A    ! Manual/SW  !
00659         ! T +---+--------------+---------------+---------------+------------+
00660         ! P ! 2 !    DTACK     ! Input Coinc.  !   Pulser B    ! Manual/SW  !
00661         ! U +---+--------------+---------------+---------------+------------+
00662         ! T ! 3 !     BERR     ! Input Coinc.  !   Pulser B    ! Manual/SW  !
00663         !   +---+--------------+---------------+---------------+------------+
00664         !   ! 4 !     LMON     ! Input Coinc.  !  Scaler end   ! Manual/SW  !
00665         +---+---+--------------+---------------+---------------+------------+
00666 */
00667 CAENVME_API
00668 CAENVME_SetOutputConf(int32_t Handle, CVOutputSelect OutSel, CVIOPolarity OutPol,
00669                       CVLEDPolarity LEDPol, CVIOSources Source);
00670 
00671 /*
00672         CAENVME_SetInputConf
00673         -----------------------------------------------------------------------------
00674         Parameters:
00675                 [in]  Handle    : The handle that identifies the device.
00676                 [in]  InSel     : The input line to configure (see CVInputSelect enum).
00677                 [in]  InPol     : The input line polarity (see CVIOPolarity enum).
00678                 [in]  LEDPol    : The output LED polarity (see CVLEDPolarity enum).
00679         -----------------------------------------------------------------------------
00680         Returns:
00681                 An error code about the execution of the function.
00682         -----------------------------------------------------------------------------
00683         Description:
00684                 The function permits to configure the input lines of the module. It
00685                 ca be specified the polarity for the line and for the LED.
00686 */
00687 CAENVME_API
00688 CAENVME_SetInputConf(int32_t Handle, CVInputSelect InSel, CVIOPolarity InPol,
00689                      CVLEDPolarity LEDPol);
00690 
00691 /*
00692         CAENVME_GetPulserConf
00693         -----------------------------------------------------------------------------
00694         Parameters:
00695                 [in]  Handle    : The handle that identifies the device.
00696                 [in]  PulSel    : The pulser to configure (see CVPulserSelect enum).
00697                 [out] Period    : The period of the pulse in time units.
00698                 [out] Width     : The width of the pulse in time units.
00699                 [out] Unit      : The time unit for the pulser configuration (see
00700                                   CVTimeUnits enum).
00701                 [out] PulseNo   : The number of pulses to generate (0 = infinite).
00702                 [out] Start     : The source signal to start the pulse burst (see
00703                                   CVIOSources enum).
00704                 [out] Reset     : The source signal to stop the pulse burst (see
00705                                   CVIOSources enum).
00706         -----------------------------------------------------------------------------
00707         Returns:
00708                 An error code about the execution of the function.
00709         -----------------------------------------------------------------------------
00710         Description:
00711                 The function permits to read the configuration of the pulsers.
00712 */
00713 CAENVME_API
00714 CAENVME_GetPulserConf(int32_t Handle, CVPulserSelect PulSel, unsigned char *Period,
00715                       unsigned char *Width, CVTimeUnits *Unit, unsigned char *PulseNo,
00716                       CVIOSources *Start, CVIOSources *Reset);
00717 
00718 /*
00719         CAENVME_GetScalerConf
00720         -----------------------------------------------------------------------------
00721         Parameters:
00722                 [in]  Handle    : The handle that identifies the device.
00723                 [out] Limit     : The counter limit for the scaler.
00724                 [out] AutoReset : The auto reset configuration.
00725                 [out] Hit       : The source signal for the signal to count (see
00726                                   CVIOSources enum).
00727                 [out] Gate      : The source signal for the gate (see CVIOSources enum).
00728                 [out] Reset     : The source signal to stop the counter (see
00729                                   CVIOSources enum).
00730         -----------------------------------------------------------------------------
00731         Returns:
00732                 An error code about the execution of the function.
00733         -----------------------------------------------------------------------------
00734         Description:
00735                 The function permits to read the configuration of the scaler.
00736 */
00737 CAENVME_API
00738 CAENVME_GetScalerConf(int32_t Handle, short *Limit, short *AutoReset,
00739                       CVIOSources *Hit, CVIOSources *Gate, CVIOSources *Reset);
00740 
00741 
00742 /*
00743         CAENVME_SetOutputConf
00744         -----------------------------------------------------------------------------
00745         Parameters:
00746                 [in]  Handle    : The handle that identifies the device.
00747                 [in]  OutSel    : The output line to configure (see CVOutputSelect enum).
00748                 [out] OutPol    : The output line polarity (see CVIOPolarity enum).
00749                 [out] LEDPol    : The output LED polarity (see CVLEDPolarity enum).
00750                 [out] Source    : The source signal to propagate to the output line (see
00751                                   CVIOSources enum).
00752         -----------------------------------------------------------------------------
00753         Returns:
00754                 An error code about the execution of the function.
00755         -----------------------------------------------------------------------------
00756         Description:
00757                 The function permits to read the configuration of the output lines.
00758 */
00759 CAENVME_API
00760 CAENVME_GetOutputConf(int32_t Handle, CVOutputSelect OutSel, CVIOPolarity *OutPol,
00761                       CVLEDPolarity *LEDPol, CVIOSources *Source);
00762 
00763 /*
00764         CAENVME_SetInputConf
00765         -----------------------------------------------------------------------------
00766         Parameters:
00767                 [in]  Handle    : The handle that identifies the device.
00768                 [in]  InSel     : The input line to configure (see CVInputSelect enum).
00769                 [out] InPol     : The input line polarity (see CVIOPolarity enum).
00770                 [out] LEDPol    : The output LED polarity (see CVLEDPolarity enum).
00771         -----------------------------------------------------------------------------
00772         Returns:
00773                 An error code about the execution of the function.
00774         -----------------------------------------------------------------------------
00775         Description:
00776                 The function permits to read the configuration of the input lines.
00777 */
00778 CAENVME_API
00779 CAENVME_GetInputConf(int32_t Handle, CVInputSelect InSel, CVIOPolarity *InPol,
00780                      CVLEDPolarity *LEDPol);
00781 
00782 /*
00783         CAENVME_ReadRegister
00784         -----------------------------------------------------------------------------
00785         Parameters:
00786                 [in]  Handle    : The handle that identifies the device.
00787                 [in]  Reg       : The internal register to read (see CVRegisters enum).
00788                 [out] Data      : The data read from the module.
00789         -----------------------------------------------------------------------------
00790         Returns:
00791                 An error code about the execution of the function.
00792         -----------------------------------------------------------------------------
00793         Description:
00794                 The function permits to read all internal registers.
00795 */
00796 CAENVME_API
00797 CAENVME_ReadRegister(int32_t Handle, CVRegisters Reg, unsigned short *Data);
00798 
00799 /*
00800         CAENVME_WriteRegister
00801         -----------------------------------------------------------------------------
00802         Parameters:
00803                 [in]  Handle    : The handle that identifies the device.
00804                 [in]  Reg       : The internal register to read (see CVRegisters enum).
00805                 [in]  Data      : The data to be written to the module.
00806         -----------------------------------------------------------------------------
00807         Returns:
00808                 An error code about the execution of the function.
00809         -----------------------------------------------------------------------------
00810         Description:
00811                 The function permits to write to all internal registers.
00812 */
00813 CAENVME_API
00814 CAENVME_WriteRegister(int32_t Handle, CVRegisters Reg, unsigned short Data);
00815 
00816 /*
00817         CAENVME_SetOutputRegister
00818         -----------------------------------------------------------------------------
00819         Parameters:
00820                 [in]  Handle    : The handle that identifies the device.
00821                 [in]  Mask      : The lines to be set.
00822         -----------------------------------------------------------------------------
00823         Returns:
00824                 An error code about the execution of the function.
00825         -----------------------------------------------------------------------------
00826         Description:
00827                 The function sets the lines specified. Refer the CVOutputRegisterBits
00828                 enum to compose and decoding the bit mask.
00829 */
00830 CAENVME_API
00831 CAENVME_SetOutputRegister(int32_t Handle, unsigned short Mask);
00832 
00833 /*
00834         CAENVME_ClearOutputRegister
00835         -----------------------------------------------------------------------------
00836         Parameters:
00837                 [in]  Handle    : The handle that identifies the device.
00838                 [in]  Mask      : The IRQ lines to be cleared.
00839         -----------------------------------------------------------------------------
00840         Returns:
00841                 An error code about the execution of the function.
00842         -----------------------------------------------------------------------------
00843         Description:
00844                 The function clears the lines specified. Refer the CVOutputRegisterBits
00845                 enum to compose and decoding the bit mask.
00846 */
00847 CAENVME_API
00848 CAENVME_ClearOutputRegister(int32_t Handle, unsigned short Mask);
00849 
00850 /*
00851         CAENVME_PulseOutputRegister
00852         -----------------------------------------------------------------------------
00853         Parameters:
00854                 [in]  Handle    : The handle that identifies the device.
00855                 [in]  Mask      : The lines to be pulsed.
00856         -----------------------------------------------------------------------------
00857         Returns:
00858                 An error code about the execution of the function.
00859         -----------------------------------------------------------------------------
00860         Description:
00861                 The function produces a pulse with the lines specified by setting and
00862                 then clearing them. Refer the CVOutputRegisterBits enum to compose and
00863                 decoding the bit mask.
00864 */
00865 CAENVME_API
00866 CAENVME_PulseOutputRegister(int32_t Handle, unsigned short Mask);
00867 
00868 /*
00869         CAENVME_ReadDisplay
00870         -----------------------------------------------------------------------------
00871         Parameters:
00872                 [in]  Handle    : The handle that identifies the device.
00873                 [out] Value     : The values read from the module (see CVDisplay enum).
00874         -----------------------------------------------------------------------------
00875         Returns:
00876                 An error code about the execution of the function.
00877         -----------------------------------------------------------------------------
00878         Description:
00879                 The function reads the VME data display on the front panel of the module.
00880                 Refer to the CVDisplay data type definition and comments to decode the
00881                 value returned.
00882 */
00883 CAENVME_API
00884 CAENVME_ReadDisplay(int32_t Handle, CVDisplay *Value);
00885 
00886 /*
00887         CAENVME_SetArbiterType
00888         -----------------------------------------------------------------------------
00889         Parameters:
00890                 [in]  Handle    : The handle that identifies the device.
00891                 [in]  Value     : The type of VME bus arbitration to implement (see
00892                                   CVArbiterTypes enum).
00893         -----------------------------------------------------------------------------
00894         Returns:
00895                 An error code about the execution of the function.
00896         -----------------------------------------------------------------------------
00897         Description:
00898                 The function sets the behaviour of the VME bus arbiter on the module.
00899 */
00900 CAENVME_API
00901 CAENVME_SetArbiterType(int32_t Handle, CVArbiterTypes Value);
00902 
00903 /*
00904         CAENVME_SetRequesterType
00905         -----------------------------------------------------------------------------
00906         Parameters:
00907                 [in]  Handle    : The handle that identifies the device.
00908                 [in]  Value     : The type of VME bus requester to implement (see
00909                                   CVRequesterTypes enum).
00910         -----------------------------------------------------------------------------
00911         Returns:
00912                 An error code about the execution of the function.
00913         -----------------------------------------------------------------------------
00914         Description:
00915                 The function sets the behaviour of the VME bus requester on the module.
00916 */
00917 CAENVME_API
00918 CAENVME_SetRequesterType(int32_t Handle, CVRequesterTypes Value);
00919 
00920 /*
00921         CAENVME_SetReleaseType
00922         -----------------------------------------------------------------------------
00923         Parameters:
00924                 [in]  Handle    : The handle that identifies the device.
00925                 [in]  Value     : The type of VME bus release policy to implement (see
00926                                   CVReleaseTypes enum).
00927         -----------------------------------------------------------------------------
00928         Returns:
00929                 An error code about the execution of the function.
00930         -----------------------------------------------------------------------------
00931         Description:
00932                 The function sets the release policy of the VME bus on the module.
00933 */
00934 CAENVME_API
00935 CAENVME_SetReleaseType(int32_t Handle, CVReleaseTypes Value);
00936 
00937 /*
00938         CAENVME_SetBusReqLevel
00939         -----------------------------------------------------------------------------
00940         Parameters:
00941                 [in]  Handle    : The handle that identifies the device.
00942                 [in]  Value     : The type of VME bus requester priority level to set
00943                                   (see CVBusReqLevels enum).
00944         -----------------------------------------------------------------------------
00945         Returns:
00946                 An error code about the execution of the function.
00947         -----------------------------------------------------------------------------
00948         Description:
00949                 The function sets the specified VME bus requester priority level on
00950                 the module.
00951 */
00952 CAENVME_API
00953 CAENVME_SetBusReqLevel(int32_t Handle, CVBusReqLevels Value);
00954 
00955 /*
00956         CAENVME_SetTimeout
00957         -----------------------------------------------------------------------------
00958         Parameters:
00959                 [in]  Handle    : The handle that identifies the device.
00960                 [in]  Value     : The value of VME bus timeout to set (see
00961                                   CVVMETimeouts enum).
00962         -----------------------------------------------------------------------------
00963         Returns:
00964                 An error code about the execution of the function.
00965         -----------------------------------------------------------------------------
00966         Description:
00967                 The function sets the specified VME bus timeout on the module.
00968 */
00969 CAENVME_API
00970 CAENVME_SetTimeout(int32_t Handle, CVVMETimeouts Value);
00971 
00972 /*
00973         CAENVME_SetLocationMonitor
00974         -----------------------------------------------------------------------------
00975         Parameters:
00976                 [in]  Handle    : The handle that identifies the device.
00977                 [in]  Address   : The addres to be monitored.
00978                 [in]  Write     : Flag to specify read or write cycle types.
00979                 [in]  Lword     : Flag to specify long word cycle type.
00980                 [in]  Iack      : Flag to specify interrupt acknowledge cycle type.
00981 
00982         -----------------------------------------------------------------------------
00983         Returns:
00984                 An error code about the execution of the function.
00985         -----------------------------------------------------------------------------
00986         Description:
00987                 The function sets the Location Monitor.
00988 */
00989 CAENVME_API
00990 CAENVME_SetLocationMonitor(int32_t Handle, uint32_t Address, CVAddressModifier Am,
00991                            short Write, short Lword, short Iack);
00992 /*
00993         CAENVME_SetFIFOMode
00994         -----------------------------------------------------------------------------
00995         Parameters:
00996                 [in]  Handle    : The handle that identifies the device.
00997                 [in]  Value     : Enable/disable the FIFO mode.
00998         -----------------------------------------------------------------------------
00999         Returns:
01000                 An error code about the execution of the function.
01001         -----------------------------------------------------------------------------
01002         Description:
01003                 The function enables/disables the auto increment of the VME addresses
01004                 during the block transfer cycles. With the FIFO mode enabled the
01005                 addresses are not incremented.
01006 */
01007 CAENVME_API
01008 CAENVME_SetFIFOMode(int32_t Handle, short Value);
01009 
01010 /*
01011         CAENVME_GetArbiterType
01012         -----------------------------------------------------------------------------
01013         Parameters:
01014                 [in]  Handle    : The handle that identifies the device.
01015                 [out] Value     : The type of VME bus arbitration implemented (see
01016                                   CVArbiterTypes enum).
01017         -----------------------------------------------------------------------------
01018         Returns:
01019                 An error code about the execution of the function.
01020         -----------------------------------------------------------------------------
01021         Description:
01022                 The function get the type of VME bus arbiter implemented on the module.
01023 */
01024 CAENVME_API
01025 CAENVME_GetArbiterType(int32_t Handle, CVArbiterTypes *Value);
01026 
01027 /*
01028         CAENVME_GetRequesterType
01029         -----------------------------------------------------------------------------
01030         Parameters:
01031                 [in]  Handle    : The handle that identifies the device.
01032                 [out] Value     : The type of VME bus requester implemented (see
01033                                   CVRequesterTypes enum).
01034         -----------------------------------------------------------------------------
01035         Returns:
01036                 An error code about the execution of the function.
01037         -----------------------------------------------------------------------------
01038         Description:
01039                 The function get the type of VME bus requester implemented on the module.
01040 */
01041 CAENVME_API
01042 CAENVME_GetRequesterType(int32_t Handle, CVRequesterTypes *Value);
01043 
01044 /*
01045         CAENVME_GetReleaseType
01046         -----------------------------------------------------------------------------
01047         Parameters:
01048                 [in]  Handle    : The handle that identifies the device.
01049                 [out] Value     : The type of VME bus release policy implemented (see
01050                                   CVReleaseTypes enum).
01051         -----------------------------------------------------------------------------
01052         Returns:
01053                 An error code about the execution of the function.
01054         -----------------------------------------------------------------------------
01055         Description:
01056                 The function get the type of VME bus release implemented on the module.
01057 */
01058 CAENVME_API
01059 CAENVME_GetReleaseType(int32_t Handle, CVReleaseTypes *Value);
01060 
01061 /*
01062         CAENVME_GetBusReqLevel
01063         -----------------------------------------------------------------------------
01064         Parameters:
01065                 [in]  Handle    : The handle that identifies the device.
01066                 [out] Value     : The type of VME bus requester priority level (see
01067                                   CVBusReqLevels enum).
01068         -----------------------------------------------------------------------------
01069         Returns:
01070                 An error code about the execution of the function.
01071         -----------------------------------------------------------------------------
01072         Description:
01073                 The function reads the specified VME bus requester priority level on
01074                 the module.
01075 */
01076 CAENVME_API
01077 CAENVME_GetBusReqLevel(int32_t Handle, CVBusReqLevels *Value);
01078 
01079 /*
01080         CAENVME_GetTimeout
01081         -----------------------------------------------------------------------------
01082         Parameters:
01083                 [in]  Handle    : The handle that identifies the device.
01084                 [out] Value     : The value of VME bus timeout (see CVVMETimeouts enum).
01085         -----------------------------------------------------------------------------
01086         Returns:
01087                 An error code about the execution of the function.
01088         -----------------------------------------------------------------------------
01089         Description:
01090                 The function sets the specified VME bus timeout on the module.
01091 */
01092 CAENVME_API
01093 CAENVME_GetTimeout(int32_t Handle, CVVMETimeouts *Value);
01094 
01095 /*
01096         CAENVME_GetFIFOMode
01097         -----------------------------------------------------------------------------
01098         Parameters:
01099                 [in]  Handle    : The handle that identifies the device.
01100                 [out] Value     : The FIFO mode read setting.
01101         -----------------------------------------------------------------------------
01102         Returns:
01103                 An error code about the execution of the function.
01104         -----------------------------------------------------------------------------
01105         Description:
01106                 The function read if the auto increment of the VME addresses during the
01107                 block transfer cycles is enabled (0) or disabled (!=0).
01108 */
01109 CAENVME_API
01110 CAENVME_GetFIFOMode(int32_t Handle, short *Value);
01111 
01112 /*
01113         CAENVME_SystemReset
01114         -----------------------------------------------------------------------------
01115         Parameters:
01116                 [in]  Handle    : The handle that identifies the device.
01117         -----------------------------------------------------------------------------
01118         Returns:
01119                 An error code about the execution of the function.
01120         -----------------------------------------------------------------------------
01121         Description:
01122                 The function performs a system reset on the module.
01123 */
01124 CAENVME_API
01125 CAENVME_SystemReset(int32_t Handle);
01126 
01127 /*
01128         CAENVME_ResetScalerCount
01129         -----------------------------------------------------------------------------
01130         Parameters:
01131                 [in]  Handle    : The handle that identifies the device.
01132         -----------------------------------------------------------------------------
01133         Returns:
01134                 An error code about the execution of the function.
01135         -----------------------------------------------------------------------------
01136         Description:
01137                 The function resets the counter of the scaler..
01138 */
01139 CAENVME_API
01140 CAENVME_ResetScalerCount(int32_t Handle);
01141 
01142 /*
01143         CAENVME_EnableScalerGate
01144         -----------------------------------------------------------------------------
01145         Parameters:
01146                 [in]  Handle    : The handle that identifies the device.
01147         -----------------------------------------------------------------------------
01148         Returns:
01149                 An error code about the execution of the function.
01150         -----------------------------------------------------------------------------
01151         Description:
01152                 The function enables the gate of the scaler.
01153 */
01154 CAENVME_API
01155 CAENVME_EnableScalerGate(int32_t Handle);
01156 
01157 /*
01158         CAENVME_DisableScalerGate
01159         -----------------------------------------------------------------------------
01160         Parameters:
01161                 [in]  Handle    : The handle that identifies the device.
01162         -----------------------------------------------------------------------------
01163         Returns:
01164                 An error code about the execution of the function.
01165         -----------------------------------------------------------------------------
01166         Description:
01167                 The function disables the gate of the scaler.
01168 */
01169 CAENVME_API
01170 CAENVME_DisableScalerGate(int32_t Handle);
01171 
01172 /*
01173         CAENVME_StartPulser
01174         -----------------------------------------------------------------------------
01175         Parameters:
01176                 [in]  Handle    : The handle that identifies the device.
01177                 [in]  PulSel    : The pulser to configure (see CVPulserSelect enum).
01178         -----------------------------------------------------------------------------
01179         Returns:
01180                 An error code about the execution of the function.
01181         -----------------------------------------------------------------------------
01182         Description:
01183                 The function starts the generation of pulse burst if the specified
01184                 pulser is configured for manual/software operation.
01185 */
01186 CAENVME_API
01187 CAENVME_StartPulser(int32_t Handle, CVPulserSelect PulSel);
01188 
01189 /*
01190         CAENVME_StopPulser
01191         -----------------------------------------------------------------------------
01192         Parameters:
01193                 [in]  Handle    : The handle that identifies the device.
01194                 [in]  PulSel    : The pulser to configure (see CVPulserSelect enum).
01195         -----------------------------------------------------------------------------
01196         Returns:
01197                 An error code about the execution of the function.
01198         -----------------------------------------------------------------------------
01199         Description:
01200                 The function stops the generation of pulse burst if the specified
01201                 pulser is configured for manual/software operation.
01202 */
01203 CAENVME_API
01204 CAENVME_StopPulser(int32_t Handle, CVPulserSelect PulSel);
01205 
01206 /*
01207         CAENVME_WriteFlashPage
01208         -----------------------------------------------------------------------------
01209         Parameters:
01210                 [in]  Handle    : The handle that identifies the device.
01211                 [in]  Data      : The data to write.
01212                 [in]  PageNum   : The flash page number to write.
01213         -----------------------------------------------------------------------------
01214         Returns:
01215                 An error code about the execution of the function.
01216         -----------------------------------------------------------------------------
01217         Description:
01218                 The function writes the data into the specified flash page.
01219 */
01220 CAENVME_API
01221 CAENVME_WriteFlashPage(int32_t Handle, unsigned char *Data, int PageNum);
01222 
01223 /*
01224         CAENVME_ReadFlashPage
01225         -----------------------------------------------------------------------------
01226         Parameters:
01227                 [in]  Handle    : The handle that identifies the device.
01228                 [out] Data      : The data to write.
01229                 [in]  PageNum   : The flash page number to write.
01230         -----------------------------------------------------------------------------
01231         Returns:
01232                 An error code about the execution of the function.
01233         -----------------------------------------------------------------------------
01234         Description:
01235                 The function reads the data from the specified flash page.
01236 */
01237 CAENVME_API
01238 CAENVME_ReadFlashPage(int32_t Handle, unsigned char *Data, int PageNum);
01239 
01240 /*
01241         CAENVME_EraseFlashPage
01242         -----------------------------------------------------------------------------
01243         Parameters:
01244                 [in]  Handle    : The handle that identifies the device.
01245                 [in]  PageNum   : The flash page number to write.
01246         -----------------------------------------------------------------------------
01247         Returns:
01248                 An error code about the execution of the function.
01249         -----------------------------------------------------------------------------
01250         Description:
01251                 The function erases the specified flash page.
01252 */
01253 CAENVME_API
01254 CAENVME_EraseFlashPage(int32_t Handle, int Pagenum);
01255 
01256 #ifdef LINUX
01257 /*
01258         CAENVME_BLTReadAsync
01259         -----------------------------------------------------------------------------
01260         Parameters:
01261                 [in]  Handle    : The handle that identifies the device.
01262                 [in]  Address   : The VME bus address.
01263                 [out] Buffer    : The data read from the VME bus.
01264                 [in]  Size      : The size of the transfer in bytes.
01265                 [in]  AM        : The address modifier (see CVAddressModifier enum).
01266                 [in]  DW        : The data width.(see CVDataWidth enum).
01267         -----------------------------------------------------------------------------
01268         Returns:
01269                 An error code about the execution of the function.
01270         -----------------------------------------------------------------------------
01271         Description:
01272                 The function starts a VME block transfer read cycle. It can be used
01273                 to perform MBLT transfers using 64 bit data width.
01274                 This function cannot be used with the V1718 USB bridge.
01275                 This function can be used only on Linux platforms.
01276                 Take care to call the CAENVME_BLTReadWait function before any other
01277                 call to a CAENVMElib function with the same handle.
01278 */
01279 CAENVME_API
01280 CAENVME_BLTReadAsync(int32_t Handle, uint32_t Address, void *Buffer,
01281                      int Size, CVAddressModifier AM, CVDataWidth DW);
01282 
01283 /*
01284         CAENVME_BLTReadWait
01285         -----------------------------------------------------------------------------
01286         Parameters:
01287                 [in]  Handle    : The handle that identifies the device.
01288                 [out] Count     : The number of bytes transferred.
01289         -----------------------------------------------------------------------------
01290         Returns:
01291                 An error code about the execution of the function.
01292         -----------------------------------------------------------------------------
01293         Description:
01294                 The function wait for the completion of a VME block transfer read
01295                 cycle started with the CAENVME_BLTReadAsync function call.
01296                 This function cannot be used with the V1718 USB bridge.
01297                 This function can be used only on Linux platforms.
01298 */
01299 CAENVME_API
01300 CAENVME_BLTReadWait(int32_t Handle, int *Count);
01301 
01302 #endif
01303 
01304 #ifdef __cplusplus
01305 }
01306 #endif // __cplusplus
01307 
01308 #endif // __CAENVMELIB_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines

Generated on 20 Jun 2014 for daqman by  doxygen 1.6.1