Subversion Repositories f9daq

Rev

Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

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