Subversion Repositories f9daq

Compare Revisions

Regard whitespace Rev 51 → Rev 52

/pts/CAENVMEtypes.h
0,0 → 1,344
/*
-----------------------------------------------------------------------------
 
--- CAEN SpA - Computing Systems Division ---
 
-----------------------------------------------------------------------------
 
CAENVMEtypes.h
 
-----------------------------------------------------------------------------
 
Author: Stefano Coluccini (s.coluccini@caen.it)
 
Created: March 2004
 
-----------------------------------------------------------------------------
*/
#ifndef __CAENVMETYPES_H
#define __CAENVMETYPES_H
 
#ifdef LINUX
#define CAEN_BYTE unsigned char
#define CAEN_BOOL int
#else
#ifdef _CVI_
#define CAEN_BYTE unsigned char
#define CAEN_BOOL int
#else
 
#define CAEN_BYTE byte
#define CAEN_BOOL VARIANT_BOOL
 
#endif
#endif
 
 
/*
CAEN VME bridges.
*/
typedef enum CVBoardTypes {
cvV1718 = 0, /* CAEN V1718 USB-VME bridge */
cvV2718 = 1, /* V2718 PCI-VME bridge with optical link */
cvA2818 = 2, /* PCI board with optical link */
cvA2719 = 3, /* Optical link piggy-back */
cvA3818 = 4 /* PCIe board with up to 4 optical links */
} CVBoardTypes;
 
/*
VME cycles data width.
Ver. 2.2 - Added byte-swapping data widths
*/
typedef enum CVDataWidth {
cvD8 = 0x01, /* 8 bit */
cvD16 = 0x02, /* 16 bit */
cvD32 = 0x04, /* 32 bit */
cvD64 = 0x08, /* 64 bit */
cvD16_swapped = 0x12, /* 16 bit swapped */
cvD32_swapped = 0x14, /* 32 bit swapped */
cvD64_swapped = 0x18 /* 64 bit swapped */
} CVDataWidth;
 
/*
VME cycles address modifiers
*/
typedef enum CVAddressModifier {
cvA16_S = 0x2D, /* A16 supervisory access */
cvA16_U = 0x29, /* A16 non-privileged */
cvA16_LCK = 0x2C, /* A16 lock command */
 
cvA24_S_BLT = 0x3F, /* A24 supervisory block transfer */
cvA24_S_PGM = 0x3E, /* A24 supervisory program access */
cvA24_S_DATA = 0x3D, /* A24 supervisory data access */
cvA24_S_MBLT = 0x3C, /* A24 supervisory 64-bit block trnsfer */
cvA24_U_BLT = 0x3B, /* A24 non-privileged block transfer */
cvA24_U_PGM = 0x3A, /* A24 non-privileged program access */
cvA24_U_DATA = 0x39, /* A24 non-privileged data access */
cvA24_U_MBLT = 0x38, /* A24 non-privileged 64-bit block trnsfer */
cvA24_LCK = 0x32, /* A24 lock command */
 
cvA32_S_BLT = 0x0F, /* A32 supervisory block transfer */
cvA32_S_PGM = 0x0E, /* A32 supervisory program access */
cvA32_S_DATA = 0x0D, /* A32 supervisory data access */
cvA32_S_MBLT = 0x0C, /* A32 supervisory 64-bit block trnsfer */
cvA32_U_BLT = 0x0B, /* A32 non-privileged block transfer */
cvA32_U_PGM = 0x0A, /* A32 non-privileged program access */
cvA32_U_DATA = 0x09, /* A32 non-privileged data access */
cvA32_U_MBLT = 0x08, /* A32 non-privileged 64-bit block trnsfer */
cvA32_LCK = 0x05, /* A32 lock command */
 
cvCR_CSR = 0x2F, /* CR/CSR space */
 
/*
The following address modifiers are not yet implemented.
*/
 
cvA40_BLT = 0x37, /* A40 block transfer (MD32) */
cvA40_LCK = 0x35, /* A40 lock command */
cvA40 = 0x34, /* A40 access */
 
cvA64 = 0x01, /* A64 single trnsfer access */
cvA64_BLT = 0x03, /* A64 block transfer */
cvA64_MBLT = 0x00, /* A64 64-bit block transfer */
cvA64_LCK = 0x04, /* A64 lock command */
 
cvA3U_2eVME = 0x21, /* 2eVME for 3U modules */
cvA6U_2eVME = 0x20 /* 2eVME for 6U modules */
} CVAddressModifier;
 
/*
Error codes returned by the exported functions.
*/
typedef enum CVErrorCodes {
cvSuccess = 0, /* Operation completed successfully */
cvBusError = -1, /* VME bus error during the cycle */
cvCommError = -2, /* Communication error */
cvGenericError = -3, /* Unspecified error */
cvInvalidParam = -4, /* Invalid parameter */
cvTimeoutError = -5, /* Timeout error */
} CVErrorCodes;
 
/*
Pulser selection.
*/
typedef enum CVPulserSelect {
cvPulserA = 0, /* Identifies the pulser 'A' */
cvPulserB = 1 /* Identifies the pulser 'B' */
} CVPulserSelect;
 
/*
Output selection.
*/
typedef enum CVOutputSelect {
cvOutput0 = 0, /* Identifies the output line 0 */
cvOutput1 = 1, /* Identifies the output line 1 */
cvOutput2 = 2, /* Identifies the output line 2 */
cvOutput3 = 3, /* Identifies the output line 3 */
cvOutput4 = 4 /* Identifies the output line 4 */
} CVOutputSelect;
 
/*
Input selection.
*/
typedef enum CVInputSelect {
cvInput0 = 0, /* Identifies the input line 0 */
cvInput1 = 1 /* Identifies the input line 1 */
} CVInputSelect;
 
/*
Signal sources.
*/
typedef enum CVIOSources {
cvManualSW = 0, /* Manual (button) or software controlled */
cvInputSrc0 = 1, /* Input line 0 */
cvInputSrc1 = 2, /* Input line 1 */
cvCoincidence = 3, /* Inputs coincidence */
cvVMESignals = 4, /* Signals from VME bus */
cvMiscSignals = 6 /* Various internal signals */
} CVIOSources;
 
/*
Time base units to specify pulses period and width.
*/
typedef enum CVTimeUnits {
cvUnit25ns = 0, /* Time unit is 25 nanoseconds */
cvUnit1600ns = 1, /* Time unit is 1.6 microseconds */
cvUnit410us = 2, /* Time unit is 410 microseconds */
cvUnit104ms = 3 /* Time unit is 104 milliseconds */
} CVTimeUnits;
 
/*
Polarity for LED emitting.
*/
typedef enum CVLEDPolarity {
cvActiveHigh = 0, /* LED emits on signal high level */
cvActiveLow = 1 /* LED emits on signal low level */
} CVLEDPolarity;
 
/*
Input and Output signal polarity.
*/
typedef enum CVIOPolarity {
cvDirect = 0, /* Normal polarity */
cvInverted = 1 /* Inverted polarity */
} CVIOPolarity;
 
/*
Accessible registers.
*/
typedef enum CVRegisters {
cvStatusReg = 0x00, /* Status register */
cvVMEControlReg = 0x01, /* VME Control register */
cvFwRelReg = 0x02, /* Firmware Release register */
cvFwDldReg = 0x03, /* Firmware Download register */
cvFlenaReg = 0x04, /* Flash Enable */
cvVMEIRQEnaReg = 0x06, /* VME IRQ Lines Enable */
cvInputReg = 0x08, /* Input register */
cvOutRegSet = 0x0A, /* Output register */
cvInMuxRegSet = 0x0B, /* Input Multiplexer */
cvOutMuxRegSet = 0x0C, /* Output Multiplexer */
cvLedPolRegSet = 0x0D, /* Led Polarity */
cvOutRegClear = 0x10, /* Output register */
cvInMuxRegClear = 0x11, /* Input Multiplexer */
cvOutMuxRegClear = 0x12, /* Output Multiplexer */
cvLedPolRegClear = 0x13, /* Led Polarity */
cvPulserA0 = 0x16, /* Period and width of Pulser A */
cvPulserA1 = 0x17, /* Num pulses and range of Pulser A */
cvPulserB0 = 0x19, /* Period and width of Pulser B */
cvPulserB1 = 0x1A, /* Num pulses and range of Pulser B */
cvScaler0 = 0x1C, /* Limit and Autores of Scaler A */
cvScaler1 = 0x1D, /* Counter value of Scaler A */
cvDispADL = 0x20, /* Display AD[15:0] */
cvDispADH = 0x21, /* Display AD[31:16] */
cvDispDTL = 0x22, /* Display DT[15:0] */
cvDispDTH = 0x23, /* Display DT[31:16] */
cvDispC1 = 0x24, /* Display Control left bar */
cvDispC2 = 0x25, /* Display Control left bar */
cvLMADL = 0x28, /* Loc. Mon. AD[15:0] */
cvLMADH = 0x29, /* Loc. Mon. AD[31:16] */
cvLMC = 0x2C /* Loc. Mon. Controls */
} CVRegisters;
 
/*
Bits for status register decoding.
*/
typedef enum CVStatusRegisterBits {
cvSYSRES = 0x0001, /* VME is in system reset state */
cvSYSCTRL = 0x0002, /* The bridge is the VME system controller */
cvDTACK = 0x0010, /* Last access has generated a DTACK signal */
cvBERR = 0x0020, /* Last access has generated a bus error */
cvDIP0 = 0x0100, /* Dip Switch position 0 state */
cvDIP1 = 0x0200, /* Dip Switch position 1 state */
cvDIP2 = 0x0400, /* Dip Switch position 2 state */
cvDIP3 = 0x0800, /* Dip Switch position 3 state */
cvDIP4 = 0x1000, /* Dip Switch position 4 state */
cvUSBTYPE = 0x8000 /* USB Speed: 0 = Full; 1 = High */
} CVStatusRegisterBits;
 
/*
Bits for input register decoding.
*/
typedef enum CVInputRegisterBits {
cvIn0Bit = 0x0001, /* Input line 0 signal level. */
cvIn1Bit = 0x0002, /* Input line 1 signal level. */
cvCoincBit = 0x0004, /* Coincidence of input signal level. */
cvPulsAOutBit = 0x0008, /* Pulser A output signal level. */
cvPulsBOutBit = 0x0010, /* Pulser B output signal level. */
cvScalEndCntBit = 0x0020, /* Scaler end counter signal level. */
cvLocMonBit = 0x0040, /* Location monitor signal level. */
} CVInputRegisterBits;
 
/*
Bits for input register decoding.
*/
typedef enum CVOutputRegisterBits {
cvPulsAStartBit = 0x0001, /* Pulser A start signal level. */
cvPulsAResetBit = 0x0002, /* Pulser A reset signal level. */
cvPulsBStartBit = 0x0004, /* Pulser B start signal level. */
cvPulsBResetBit = 0x0008, /* Pulser B reset signal level. */
cvScalGateBit = 0x0010, /* Scaler gate signal level. */
cvScalResetBit = 0x0020, /* Scaler reset counter signal level. */
cvOut0Bit = 0x0040, /* Output line 0 signal level. */
cvOut1Bit = 0x0080, /* Output line 1 signal level. */
cvOut2Bit = 0x0100, /* Output line 2 signal level. */
cvOut3Bit = 0x0200, /* Output line 3 signal level. */
cvOut4Bit = 0x0400, /* Output line 4 signal level. */
} CVOutputRegisterBits;
 
/*
Types of VME Arbiter.
*/
typedef enum CVArbiterTypes {
cvPriorized = 0, /* Priority Arbiter */
cvRoundRobin = 1 /* Round-Robin Arbiter */
} CVArbiterTypes;
 
/*
Types of VME Bus Requester.
*/
typedef enum CVRequesterTypes {
cvFair = 0, /* Fair bus requester */
cvDemand = 1 /* On demand bus requester */
} CVRequesterTypes;
 
/*
Types of VME Bus release.
*/
typedef enum CVReleaseTypes {
cvRWD = 0, /* Release When Done */
cvROR = 1 /* Release On Request */
} CVReleaseTypes;
 
/*
VME bus request levels.
*/
typedef enum CVBusReqLevels {
cvBR0 = 0, /* Bus request level 0 */
cvBR1 = 1, /* Bus request level 1 */
cvBR2 = 2, /* Bus request level 2 */
cvBR3 = 3 /* Bus request level 3 */
} CVBusReqLevels;
 
/*
VME Interrupt levels.
*/
typedef enum CVIRQLevels {
cvIRQ1 = 0x01, /* Interrupt level 1 */
cvIRQ2 = 0x02, /* Interrupt level 2 */
cvIRQ3 = 0x04, /* Interrupt level 3 */
cvIRQ4 = 0x08, /* Interrupt level 4 */
cvIRQ5 = 0x10, /* Interrupt level 5 */
cvIRQ6 = 0x20, /* Interrupt level 6 */
cvIRQ7 = 0x40 /* Interrupt level 7 */
} CVIRQLevels;
 
/*
VME bus timeouts.
*/
typedef enum CVVMETimeouts {
cvTimeout50us = 0, /* Timeout is 50 microseconds */
cvTimeout400us = 1 /* Timeout is 400 microseconds */
} CVVMETimeouts;
 
/*
Data type to store the front panel display last access data.
*/
typedef struct CVDisplay {
long cvAddress; /* VME Address */
long cvData; /* VME Data */
long cvAM; /* Address modifier */
long cvIRQ; /* IRQ levels */
CAEN_BOOL cvDS0; /* Data Strobe 0 signal */
CAEN_BOOL cvDS1; /* Data Strobe 1 signal */
CAEN_BOOL cvAS; /* Address Strobe signal */
CAEN_BOOL cvIACK; /* Interrupt Acknowledge signal */
CAEN_BOOL cvWRITE; /* Write signal */
CAEN_BOOL cvLWORD; /* Long Word signal */
CAEN_BOOL cvDTACK; /* Data Acknowledge signal */
CAEN_BOOL cvBERR; /* Bus Error signal */
CAEN_BOOL cvSYSRES; /* System Reset signal */
CAEN_BOOL cvBR; /* Bus Request signal */
CAEN_BOOL cvBG; /* Bus Grant signal */
} CVDisplay;
 
#endif // __CAENVMETYPES_H
/pts/CAENVMElib.h
0,0 → 1,1325
/*!
-----------------------------------------------------------------------------
 
--- CAEN SpA - Computing Systems Division ---
 
-----------------------------------------------------------------------------
 
CAENVMElib.h
 
-----------------------------------------------------------------------------
 
Created: March 2004
 
-----------------------------------------------------------------------------
*/
#ifndef __CAENVMELIB_H
#define __CAENVMELIB_H
 
#include <stdio.h>
// Rev. 2.5
#ifdef LINUX
#include <stdint.h>
#endif
#include <stdlib.h>
#ifndef _CVI_
#include <malloc.h>
#endif
#include "CAENVMEoslib.h"
#include "CAENVMEtypes.h"
 
#ifdef WIN32
#ifdef _CVI_
typedef char int8_t;
typedef unsigned char uint8_t;
typedef short int16_t;
typedef unsigned short uint16_t;
typedef int int32_t;
typedef unsigned int uint32_t;
// typedef INT64 int64_t;
// typedef UINT64 uint64_t;
#else
typedef INT8 int8_t;
typedef UINT8 uint8_t;
typedef INT16 int16_t;
typedef UINT16 uint16_t;
typedef INT32 int32_t;
typedef UINT32 uint32_t;
typedef INT64 int64_t;
typedef UINT64 uint64_t;
#endif
#endif
 
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
/*
CAENVME_DecodeError
-----------------------------------------------------------------------------
Parameters:
[in] Code : The error code to decode.
-----------------------------------------------------------------------------
Returns:
An string describing the error condition.
-----------------------------------------------------------------------------
Description:
Decode the error.
*/
const char *
#ifdef WIN32
__stdcall
#endif
CAENVME_DecodeError(CVErrorCodes Code);
 
/*
CAENVME_API CAENVME_SWRelease
-----------------------------------------------------------------------------
Parameters:
[out] SwRel : Returns the software release of the library.
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
Permits to read the software release of the library.
*/
CAENVME_API
CAENVME_SWRelease(char *SwRel);
 
/*
CAENVME_BoardFWRelease.
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
[out] FWRel : Returns the firmware release of the device.
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
Permits to read the firmware release loaded into the device.
*/
CAENVME_API
CAENVME_BoardFWRelease(int32_t Handle, char *FWRel);
 
/*
CAENVME_DriverRelease.
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
[out] Rel : Returns the software release of the device driver
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
Permits to read the software release of the device driver.
*/
CAENVME_API
CAENVME_DriverRelease(int32_t Handle, char *Rel);
 
/*
CAENVME_DeviceReset
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
Permits to reset the device.
Implemented for A2818, A2719, V2718 on Linux platform only
*/
CAENVME_API
CAENVME_DeviceReset(int32_t dev);
 
 
/*
CAENVME_Init
-----------------------------------------------------------------------------
Parameters:
[in] BdType : The model of the bridge (V1718/V2718).
[in] Link : The link number (don't care for V1718).
[in] BdNum : The board number in the link.
[out] Handle : The handle that identifies the device.
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function generates an opaque handle to identify a module
attached to the PC. In the case of V1718 bridge it must be
specified only the module index (BdNum) because the link is USB.
In the case of V2718 it must be specified also the link because
you can have some A2818 optical link inside the PC.
*/
CAENVME_API
CAENVME_Init(CVBoardTypes BdType, short Link, short BdNum, int32_t *Handle);
 
/*
CAENVME_End
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
Notifies the library the end of work and free the allocated
resources.
*/
CAENVME_API
CAENVME_End(int32_t Handle);
 
/*
CAENVME_ReadCycle
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
[in] Address : The VME bus address.
[out] Data : The data read from the VME bus.
[in] AM : The address modifier (see CVAddressModifier enum).
[in] DW : The data width.(see CVDataWidth enum).
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function performs a single VME read cycle.
*/
CAENVME_API
CAENVME_ReadCycle(int32_t Handle, uint32_t Address, void *Data,
CVAddressModifier AM, CVDataWidth DW);
 
/*
CAENVME_RMWCycle
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
[in] Address: The VME bus address.
[in/out] Data : The data read and then written to the VME bus.
[in] AM : The address modifier (see CVAddressModifier enum).
[in] DW : The data width.(see CVDataWidth enum).
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function performs a Read-Modify-Write cycle. The Data parameter
is bidirectional: it is used to write the value to the VME bus and to
return the value read.
*/
CAENVME_API
CAENVME_RMWCycle(int32_t Handle, uint32_t Address, void *Data,
CVAddressModifier AM, CVDataWidth DW);
 
/*
CAENVME_WriteCycle
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
[in] Address : The VME bus address.
[in] Data : The data written to the VME bus.
[in] AM : The address modifier (see CVAddressModifier enum).
[in] DW : The data width.(see CVDataWidth enum).
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function performs a single VME write cycle.
*/
CAENVME_API
CAENVME_WriteCycle(int32_t Handle, uint32_t Address, void *Data,
CVAddressModifier AM, CVDataWidth DW);
 
/*
CAENVME_MultiRead (Ver. 2.2)
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
[in] Addrs : The VME bus addresses.
[out] Buffer : The data read from the VME bus.
[in] NCycles : The number of read cycles to perform.
[in] AMs : The address modifiers (see CVAddressModifier enum).
[in] DWs : The data widths.(see CVDataWidth enum).
[out] ECs : The error codes relaive to each cycle.
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function performs a block of single VME read cycles.
*/
CAENVME_API
CAENVME_MultiRead(int32_t Handle, uint32_t *Addrs, uint32_t *Buffer,
int NCycles, CVAddressModifier *AMs, CVDataWidth *DWs, CVErrorCodes *ECs);
 
/*
CAENVME_MultiWrite (Ver. 2.2)
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
[in] Addrs : The VME bus addresses.
[in] Buffer : The data to write to the VME bus.
[in] NCycles : The number of read cycles to perform.
[in] AMs : The address modifiers (see CVAddressModifier enum).
[in] DWs : The data widths.(see CVDataWidth enum).
[out] ECs : The error codes relaive to each cycle.
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function performs a block of single VME write cycles.
*/
CAENVME_API
CAENVME_MultiWrite(int32_t Handle, uint32_t *Addrs, uint32_t *Buffer,
int NCycles, CVAddressModifier *AMs, CVDataWidth *DWs, CVErrorCodes *ECs);
 
/*
CAENVME_BLTReadCycle
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
[in] Address : The VME bus address.
[out] Buffer : The data read from the VME bus.
[in] Size : The size of the transfer in bytes.
[in] AM : The address modifier (see CVAddressModifier enum).
[in] DW : The data width.(see CVDataWidth enum).
[out] count : The number of bytes transferred.
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function performs a VME block transfer read cycle. It can be used to
perform MBLT transfers using 64 bit data width.
*/
CAENVME_API
CAENVME_BLTReadCycle(int32_t Handle, uint32_t Address, void *Buffer,
int Size, CVAddressModifier AM, CVDataWidth DW, int *count);
 
/*
Ver. 2.3 - New function
 
CAENVME_FIFOBLTReadCycle
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
[in] Address : The VME bus address.
[out] Buffer : The data read from the VME bus.
[in] Size : The size of the transfer in bytes.
[in] AM : The address modifier (see CVAddressModifier enum).
[in] DW : The data width.(see CVDataWidth enum).
[out] count : The number of bytes transferred.
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function performs a VME block transfer read cycle. It can be used to
perform MBLT transfers using 64 bit data width. The Address is not
incremented on the VMEBus during the cycle.
*/
CAENVME_API
CAENVME_FIFOBLTReadCycle(int32_t Handle, uint32_t Address, void *Buffer,
int Size, CVAddressModifier AM, CVDataWidth DW, int *count);
 
/*
CAENVME_MBLTReadCycle
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
[in] Address : The VME bus address.
[out] Buffer : The data read from the VME bus.
[in] Size : The size of the transfer in bytes.
[in] AM : The address modifier (see CVAddressModifier enum).
[out] count : The number of bytes transferred.
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function performs a VME multiplexed block transfer read cycle.
*/
CAENVME_API
CAENVME_MBLTReadCycle(int32_t Handle, uint32_t Address, void *Buffer,
int Size, CVAddressModifier AM, int *count);
 
/*
Ver. 2.3 - New function
CAENVME_FIFOMBLTReadCycle
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
[in] Address : The VME bus address.
[out] Buffer : The data read from the VME bus.
[in] Size : The size of the transfer in bytes.
[in] AM : The address modifier (see CVAddressModifier enum).
[out] count : The number of bytes transferred.
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function performs a VME multiplexed block transfer read cycle.
The Address is not incremented on the VMEBus during the cycle.
*/
CAENVME_API
CAENVME_FIFOMBLTReadCycle(int32_t Handle, uint32_t Address, void *Buffer,
int Size, CVAddressModifier AM, int *count);
 
/*
CAENVME_BLTWriteCycle
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
[in] Address : The VME bus address.
[in] Buffer : The data to be written to the VME bus.
[in] Size : The size of the transfer in bytes.
[in] AM : The address modifier (see CVAddressModifier enum).
[in] DW : The data width.(see CVDataWidth enum).
[out] count : The number of bytes transferred.
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function performs a VME block transfer write cycle.
*/
CAENVME_API
CAENVME_BLTWriteCycle(int32_t Handle, uint32_t Address, void *Buffer,
int size, CVAddressModifier AM, CVDataWidth DW, int *count);
 
/*
Ver. 2.3 - New function
 
CAENVME_FIFOBLTWriteCycle
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
[in] Address : The VME bus address.
[in] Buffer : The data to be written to the VME bus.
[in] Size : The size of the transfer in bytes.
[in] AM : The address modifier (see CVAddressModifier enum).
[in] DW : The data width.(see CVDataWidth enum).
[out] count : The number of bytes transferred.
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function performs a VME block transfer write cycle. The address
is not incremented during the cycle.
*/
CAENVME_API
CAENVME_FIFOBLTWriteCycle(int32_t Handle, uint32_t Address, void *Buffer,
int size, CVAddressModifier AM, CVDataWidth DW, int *count);
 
/*
CAENVME_MBLTWriteCycle
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
[in] Address : The VME bus address.
[in] Buffer : The data to be written to the VME bus.
[in] Size : The size of the transfer in bytes.
[in] AM : The address modifier (see CVAddressModifier enum).
[out] count : The number of bytes transferred.
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function performs a VME multiplexed block transfer write cycle.
*/
CAENVME_API
CAENVME_MBLTWriteCycle(int32_t Handle, uint32_t Address, void *Buffer,
int size, CVAddressModifier AM, int *count);
 
/*
Ver. 2.3 - New function
CAENVME_FIFOMBLTWriteCycle
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
[in] Address : The VME bus address.
[in] Buffer : The data to be written to the VME bus.
[in] Size : The size of the transfer in bytes.
[in] AM : The address modifier (see CVAddressModifier enum).
[out] count : The number of bytes transferred.
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function performs a VME multiplexed block transfer write cycle.
The address is not incremented during the cycle.
*/
CAENVME_API
CAENVME_FIFOMBLTWriteCycle(int32_t Handle, uint32_t Address, void *Buffer,
int size, CVAddressModifier AM, int *count);
 
/*
CAENVME_ADOCycle
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
[in] Address : The VME bus address.
[in] AM : The address modifier (see CVAddressModifier enum).
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function performs a VME address only cycle. It can be used to
perform MBLT transfers using 64 bit data width.
*/
CAENVME_API
CAENVME_ADOCycle(int32_t Handle, uint32_t Address, CVAddressModifier AM);
 
/*
CAENVME_ADOHCycle
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
[in] Address : The VME bus address.
[in] AM : The address modifier (see CVAddressModifier enum).
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function performs a VME address only with handshake cycle.
*/
CAENVME_API
CAENVME_ADOHCycle(int32_t Handle, uint32_t Address, CVAddressModifier AM);
 
/*
CAENVME_IACKCycle
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
[in] Level : The IRQ level to acknowledge (see CVIRQLevels enum).
[in] DW : The data width.(see CVDataWidth enum).
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function performs a VME interrupt acknowledge cycle.
*/
CAENVME_API
CAENVME_IACKCycle(int32_t Handle, CVIRQLevels Level, void *Vector, CVDataWidth DW);
 
/*
CAENVME_IRQCheck
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
[out] Mask : A bit-mask indicating the active IRQ lines.
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function returns a bit mask indicating the active IRQ lines.
*/
CAENVME_API
CAENVME_IRQCheck(int32_t Handle, CAEN_BYTE *Mask);
 
/*
CAENVME_IRQEnable
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
[in] Mask : A bit-mask indicating the IRQ lines.
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function enables the IRQ lines specified by Mask.
*/
CAENVME_API
CAENVME_IRQEnable(int32_t Handle, uint32_t Mask);
 
/*
CAENVME_IRQDisable
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
[in] Mask : A bit-mask indicating the IRQ lines.
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function disables the IRQ lines specified by Mask.
*/
CAENVME_API
CAENVME_IRQDisable(int32_t Handle, uint32_t Mask);
 
/*
CAENVME_IRQWait
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
[in] Mask : A bit-mask indicating the IRQ lines.
[in] Timeout : Timeout in milliseconds.
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function wait the IRQ lines specified by Mask until one of
them raise or timeout expires.
*/
CAENVME_API
CAENVME_IRQWait(int32_t Handle, uint32_t Mask, uint32_t Timeout);
 
/*
CAENVME_SetPulserConf
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
[in] PulSel : The pulser to configure (see CVPulserSelect enum).
[in] Period : The period of the pulse in time units.
[in] Width : The width of the pulse in time units.
[in] Unit : The time unit for the pulser configuration (see
CVTimeUnits enum).
[in] PulseNo : The number of pulses to generate (0 = infinite).
[in] Start : The source signal to start the pulse burst (see
CVIOSources enum).
[in] Reset : The source signal to stop the pulse burst (see
CVIOSources enum).
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function permits to configure the pulsers. All the timing parameters
are expressed in the time units specified. The start signal source can be
one of: front panel button or software (cvManualSW), input signal 0
(cvInputSrc0),input signal 1 (cvInputSrc1) or input coincidence
(cvCoincidence). The reset signal source can be: front panel button or
software (cvManualSW) or, for pulser A the input signal 0 (cvInputSrc0),
for pulser B the input signal 1 (cvInputSrc1).
*/
CAENVME_API
CAENVME_SetPulserConf(int32_t Handle, CVPulserSelect PulSel, unsigned char Period,
unsigned char Width, CVTimeUnits Unit, unsigned char PulseNo,
CVIOSources Start, CVIOSources Reset);
 
/*
CAENVME_SetScalerConf
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
[in] Limit : The counter limit for the scaler.
[in] AutoReset : Enable/disable the counter auto reset.
[in] Hit : The source signal for the signal to count (see
CVIOSources enum).
[in] Gate : The source signal for the gate (see CVIOSources enum).
[in] Reset : The source signal to stop the counter (see
CVIOSources enum).
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function permits to configure the scaler. Limit range is 0 - 1024
(10 bit). The hit signal source can be: input signal 0 (cvInputSrc0)
or input coincidence (cvCoincidence). The gate signal source can be:
front panel button or software (cvManualSW) or input signal 1
(cvInputSrc1). The reset signal source can be: front panel button or
software (cvManualSW) or input signal 1 (cvInputSrc1).
*/
CAENVME_API
CAENVME_SetScalerConf(int32_t Handle, short Limit, short AutoReset,
CVIOSources Hit, CVIOSources Gate, CVIOSources Reset);
 
/*
CAENVME_SetOutputConf
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
[in] OutSel : The output line to configure (see CVOutputSelect
enum).
[in] OutPol : The output line polarity (see CVIOPolarity enum).
[in] LEDPol : The output LED polarity (see CVLEDPolarity enum).
[in] Source : The source signal to propagate to the output line
(see CVIOSources enum).
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function permits to configure the output lines of the module. It
can be specified the polarity for the line and for the LED. The
output line source depends on the line as figured out by the
following table:
 
+-----------------------------------------------------------+
! S O U R C E S E L E C T I O N !
+--------------+---------------+---------------+------------+
! cvVMESignals ! cvCoincidence ! cvMiscSignals ! cvManualSW !
+---+---+--------------+---------------+---------------+------------+
! ! 0 ! DS ! Input Coinc. ! Pulser A ! Manual/SW !
! O +---+--------------+---------------+---------------+------------+
! U ! 1 ! AS ! Input Coinc. ! Pulser A ! Manual/SW !
! T +---+--------------+---------------+---------------+------------+
! P ! 2 ! DTACK ! Input Coinc. ! Pulser B ! Manual/SW !
! U +---+--------------+---------------+---------------+------------+
! T ! 3 ! BERR ! Input Coinc. ! Pulser B ! Manual/SW !
! +---+--------------+---------------+---------------+------------+
! ! 4 ! LMON ! Input Coinc. ! Scaler end ! Manual/SW !
+---+---+--------------+---------------+---------------+------------+
*/
CAENVME_API
CAENVME_SetOutputConf(int32_t Handle, CVOutputSelect OutSel, CVIOPolarity OutPol,
CVLEDPolarity LEDPol, CVIOSources Source);
 
/*
CAENVME_SetInputConf
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
[in] InSel : The input line to configure (see CVInputSelect enum).
[in] InPol : The input line polarity (see CVIOPolarity enum).
[in] LEDPol : The output LED polarity (see CVLEDPolarity enum).
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function permits to configure the input lines of the module. It
ca be specified the polarity for the line and for the LED.
*/
CAENVME_API
CAENVME_SetInputConf(int32_t Handle, CVInputSelect InSel, CVIOPolarity InPol,
CVLEDPolarity LEDPol);
 
/*
CAENVME_GetPulserConf
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
[in] PulSel : The pulser to configure (see CVPulserSelect enum).
[out] Period : The period of the pulse in time units.
[out] Width : The width of the pulse in time units.
[out] Unit : The time unit for the pulser configuration (see
CVTimeUnits enum).
[out] PulseNo : The number of pulses to generate (0 = infinite).
[out] Start : The source signal to start the pulse burst (see
CVIOSources enum).
[out] Reset : The source signal to stop the pulse burst (see
CVIOSources enum).
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function permits to read the configuration of the pulsers.
*/
CAENVME_API
CAENVME_GetPulserConf(int32_t Handle, CVPulserSelect PulSel, unsigned char *Period,
unsigned char *Width, CVTimeUnits *Unit, unsigned char *PulseNo,
CVIOSources *Start, CVIOSources *Reset);
 
/*
CAENVME_GetScalerConf
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
[out] Limit : The counter limit for the scaler.
[out] AutoReset : The auto reset configuration.
[out] Hit : The source signal for the signal to count (see
CVIOSources enum).
[out] Gate : The source signal for the gate (see CVIOSources enum).
[out] Reset : The source signal to stop the counter (see
CVIOSources enum).
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function permits to read the configuration of the scaler.
*/
CAENVME_API
CAENVME_GetScalerConf(int32_t Handle, short *Limit, short *AutoReset,
CVIOSources *Hit, CVIOSources *Gate, CVIOSources *Reset);
 
 
/*
CAENVME_SetOutputConf
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
[in] OutSel : The output line to configure (see CVOutputSelect enum).
[out] OutPol : The output line polarity (see CVIOPolarity enum).
[out] LEDPol : The output LED polarity (see CVLEDPolarity enum).
[out] Source : The source signal to propagate to the output line (see
CVIOSources enum).
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function permits to read the configuration of the output lines.
*/
CAENVME_API
CAENVME_GetOutputConf(int32_t Handle, CVOutputSelect OutSel, CVIOPolarity *OutPol,
CVLEDPolarity *LEDPol, CVIOSources *Source);
 
/*
CAENVME_SetInputConf
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
[in] InSel : The input line to configure (see CVInputSelect enum).
[out] InPol : The input line polarity (see CVIOPolarity enum).
[out] LEDPol : The output LED polarity (see CVLEDPolarity enum).
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function permits to read the configuration of the input lines.
*/
CAENVME_API
CAENVME_GetInputConf(int32_t Handle, CVInputSelect InSel, CVIOPolarity *InPol,
CVLEDPolarity *LEDPol);
 
/*
CAENVME_ReadRegister
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
[in] Reg : The internal register to read (see CVRegisters enum).
[out] Data : The data read from the module.
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function permits to read all internal registers.
*/
CAENVME_API
CAENVME_ReadRegister(int32_t Handle, CVRegisters Reg, unsigned int *Data);
 
/*
CAENVME_WriteRegister
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
[in] Reg : The internal register to read (see CVRegisters enum).
[in] Data : The data to be written to the module.
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function permits to write to all internal registers.
*/
CAENVME_API
CAENVME_WriteRegister(int32_t Handle, CVRegisters Reg, unsigned int Data);
 
/*
CAENVME_SetOutputRegister
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
[in] Mask : The lines to be set.
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function sets the lines specified. Refer the CVOutputRegisterBits
enum to compose and decoding the bit mask.
*/
CAENVME_API
CAENVME_SetOutputRegister(int32_t Handle, unsigned short Mask);
 
/*
CAENVME_ClearOutputRegister
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
[in] Mask : The IRQ lines to be cleared.
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function clears the lines specified. Refer the CVOutputRegisterBits
enum to compose and decoding the bit mask.
*/
CAENVME_API
CAENVME_ClearOutputRegister(int32_t Handle, unsigned short Mask);
 
/*
CAENVME_PulseOutputRegister
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
[in] Mask : The lines to be pulsed.
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function produces a pulse with the lines specified by setting and
then clearing them. Refer the CVOutputRegisterBits enum to compose and
decoding the bit mask.
*/
CAENVME_API
CAENVME_PulseOutputRegister(int32_t Handle, unsigned short Mask);
 
/*
CAENVME_ReadDisplay
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
[out] Value : The values read from the module (see CVDisplay enum).
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function reads the VME data display on the front panel of the module.
Refer to the CVDisplay data type definition and comments to decode the
value returned.
*/
CAENVME_API
CAENVME_ReadDisplay(int32_t Handle, CVDisplay *Value);
 
/*
CAENVME_SetArbiterType
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
[in] Value : The type of VME bus arbitration to implement (see
CVArbiterTypes enum).
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function sets the behaviour of the VME bus arbiter on the module.
*/
CAENVME_API
CAENVME_SetArbiterType(int32_t Handle, CVArbiterTypes Value);
 
/*
CAENVME_SetRequesterType
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
[in] Value : The type of VME bus requester to implement (see
CVRequesterTypes enum).
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function sets the behaviour of the VME bus requester on the module.
*/
CAENVME_API
CAENVME_SetRequesterType(int32_t Handle, CVRequesterTypes Value);
 
/*
CAENVME_SetReleaseType
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
[in] Value : The type of VME bus release policy to implement (see
CVReleaseTypes enum).
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function sets the release policy of the VME bus on the module.
*/
CAENVME_API
CAENVME_SetReleaseType(int32_t Handle, CVReleaseTypes Value);
 
/*
CAENVME_SetBusReqLevel
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
[in] Value : The type of VME bus requester priority level to set
(see CVBusReqLevels enum).
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function sets the specified VME bus requester priority level on
the module.
*/
CAENVME_API
CAENVME_SetBusReqLevel(int32_t Handle, CVBusReqLevels Value);
 
/*
CAENVME_SetTimeout
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
[in] Value : The value of VME bus timeout to set (see
CVVMETimeouts enum).
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function sets the specified VME bus timeout on the module.
*/
CAENVME_API
CAENVME_SetTimeout(int32_t Handle, CVVMETimeouts Value);
 
/*
CAENVME_SetLocationMonitor
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
[in] Address : The addres to be monitored.
[in] Write : Flag to specify read or write cycle types.
[in] Lword : Flag to specify long word cycle type.
[in] Iack : Flag to specify interrupt acknowledge cycle type.
 
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function sets the Location Monitor.
*/
CAENVME_API
CAENVME_SetLocationMonitor(int32_t Handle, uint32_t Address, CVAddressModifier Am,
short Write, short Lword, short Iack);
/*
CAENVME_SetFIFOMode
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
[in] Value : Enable/disable the FIFO mode.
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function enables/disables the auto increment of the VME addresses
during the block transfer cycles. With the FIFO mode enabled the
addresses are not incremented.
*/
CAENVME_API
CAENVME_SetFIFOMode(int32_t Handle, short Value);
 
/*
CAENVME_GetArbiterType
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
[out] Value : The type of VME bus arbitration implemented (see
CVArbiterTypes enum).
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function get the type of VME bus arbiter implemented on the module.
*/
CAENVME_API
CAENVME_GetArbiterType(int32_t Handle, CVArbiterTypes *Value);
 
/*
CAENVME_GetRequesterType
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
[out] Value : The type of VME bus requester implemented (see
CVRequesterTypes enum).
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function get the type of VME bus requester implemented on the module.
*/
CAENVME_API
CAENVME_GetRequesterType(int32_t Handle, CVRequesterTypes *Value);
 
/*
CAENVME_GetReleaseType
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
[out] Value : The type of VME bus release policy implemented (see
CVReleaseTypes enum).
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function get the type of VME bus release implemented on the module.
*/
CAENVME_API
CAENVME_GetReleaseType(int32_t Handle, CVReleaseTypes *Value);
 
/*
CAENVME_GetBusReqLevel
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
[out] Value : The type of VME bus requester priority level (see
CVBusReqLevels enum).
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function reads the specified VME bus requester priority level on
the module.
*/
CAENVME_API
CAENVME_GetBusReqLevel(int32_t Handle, CVBusReqLevels *Value);
 
/*
CAENVME_GetTimeout
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
[out] Value : The value of VME bus timeout (see CVVMETimeouts enum).
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function sets the specified VME bus timeout on the module.
*/
CAENVME_API
CAENVME_GetTimeout(int32_t Handle, CVVMETimeouts *Value);
 
/*
CAENVME_GetFIFOMode
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
[out] Value : The FIFO mode read setting.
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function read if the auto increment of the VME addresses during the
block transfer cycles is enabled (0) or disabled (!=0).
*/
CAENVME_API
CAENVME_GetFIFOMode(int32_t Handle, short *Value);
 
/*
CAENVME_SystemReset
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function performs a system reset on the module.
*/
CAENVME_API
CAENVME_SystemReset(int32_t Handle);
 
/*
CAENVME_ResetScalerCount
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function resets the counter of the scaler..
*/
CAENVME_API
CAENVME_ResetScalerCount(int32_t Handle);
 
/*
CAENVME_EnableScalerGate
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function enables the gate of the scaler.
*/
CAENVME_API
CAENVME_EnableScalerGate(int32_t Handle);
 
/*
CAENVME_DisableScalerGate
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function disables the gate of the scaler.
*/
CAENVME_API
CAENVME_DisableScalerGate(int32_t Handle);
 
/*
CAENVME_StartPulser
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
[in] PulSel : The pulser to configure (see CVPulserSelect enum).
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function starts the generation of pulse burst if the specified
pulser is configured for manual/software operation.
*/
CAENVME_API
CAENVME_StartPulser(int32_t Handle, CVPulserSelect PulSel);
 
/*
CAENVME_StopPulser
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
[in] PulSel : The pulser to configure (see CVPulserSelect enum).
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function stops the generation of pulse burst if the specified
pulser is configured for manual/software operation.
*/
CAENVME_API
CAENVME_StopPulser(int32_t Handle, CVPulserSelect PulSel);
 
/*
CAENVME_WriteFlashPage
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
[in] Data : The data to write.
[in] PageNum : The flash page number to write.
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function writes the data into the specified flash page.
*/
CAENVME_API
CAENVME_WriteFlashPage(int32_t Handle, unsigned char *Data, int PageNum);
 
/*
CAENVME_ReadFlashPage
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
[out] Data : The data to write.
[in] PageNum : The flash page number to write.
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function reads the data from the specified flash page.
*/
CAENVME_API
CAENVME_ReadFlashPage(int32_t Handle, unsigned char *Data, int PageNum);
 
/*
CAENVME_EraseFlashPage
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
[in] PageNum : The flash page number to write.
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function erases the specified flash page.
*/
CAENVME_API
CAENVME_EraseFlashPage(int32_t Handle, int Pagenum);
 
#ifdef LINUX
/*
CAENVME_BLTReadAsync
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
[in] Address : The VME bus address.
[out] Buffer : The data read from the VME bus.
[in] Size : The size of the transfer in bytes.
[in] AM : The address modifier (see CVAddressModifier enum).
[in] DW : The data width.(see CVDataWidth enum).
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function starts a VME block transfer read cycle. It can be used
to perform MBLT transfers using 64 bit data width.
This function cannot be used with the V1718 USB bridge.
This function can be used only on Linux platforms.
Take care to call the CAENVME_BLTReadWait function before any other
call to a CAENVMElib function with the same handle.
*/
CAENVME_API
CAENVME_BLTReadAsync(int32_t Handle, uint32_t Address, void *Buffer,
int Size, CVAddressModifier AM, CVDataWidth DW);
 
/*
CAENVME_BLTReadWait
-----------------------------------------------------------------------------
Parameters:
[in] Handle : The handle that identifies the device.
[out] Count : The number of bytes transferred.
-----------------------------------------------------------------------------
Returns:
An error code about the execution of the function.
-----------------------------------------------------------------------------
Description:
The function wait for the completion of a VME block transfer read
cycle started with the CAENVME_BLTReadAsync function call.
This function cannot be used with the V1718 USB bridge.
This function can be used only on Linux platforms.
*/
CAENVME_API
CAENVME_BLTReadWait(int32_t Handle, int *Count);
 
#endif
 
#ifdef __cplusplus
}
#endif // __cplusplus
 
#endif // __CAENVMELIB_H
/pts/CAENVMEoslib.h
0,0 → 1,36
/*
-----------------------------------------------------------------------------
 
--- CAEN SpA - Computing Systems Division ---
 
-----------------------------------------------------------------------------
 
CAENVMEoslib.h
 
-----------------------------------------------------------------------------
 
Author: Stefano Coluccini (s.coluccini@caen.it)
 
Created: January 2004
 
-----------------------------------------------------------------------------
*/
 
 
#ifndef __CAENVMEOSLIB_H
#define __CAENVMEOSLIB_H
 
#ifdef WIN32
 
#include <windows.h>
#include <winioctl.h>
 
#define CAENVME_API CVErrorCodes __stdcall
 
#else // WIN32
 
#define CAENVME_API CVErrorCodes
 
#endif // WIN32
 
#endif // __CAENVMEOSLIB_H
/pts/CAEN_V1718.c
0,0 → 1,187
 
#include <stdlib.h>
#include <stdio.h>
#include <CAENVMElib.h>
#include <CAENVMElib.h>
#include <CAENVMEoslib.h>
#include <CAENVMEtypes.h>
 
 
int32_t udev;
 
extern int VMEerrors;
 
int VME_start (char* serial)
{
 
CVErrorCodes result = CAENVME_Init( cvV1718 , 0 , 0 , &udev);
if (result != cvSuccess) {
printf("CAEN1718 Init %s\n", CAENVME_DecodeError(result));
printf(" Check usb cable, usb udev permissions and restart! Exiting .....\n");
exit(-1);
}
if (serial == NULL) serial = malloc(100*sizeof(char));
CAENVME_BoardFWRelease(udev, serial);
return result;
}
 
 
int VME_read(long Handle, unsigned long Address, void *Data, CVAddressModifier AM, CVDataWidth DW)
{
 
CVErrorCodes result;
int ncount=0;
while (1){
result = CAENVME_ReadCycle(Handle, Address, Data, AM, DW );
if (result !=cvSuccess ) {
VMEerrors++;
printf("%d CAENVME_ReadCycle at 0x%0lX failed! data=0x%0X AM= 0x%0X DW= 0x%0X err=%s\n", ncount,Address, *((uint32_t *) Data),AM,DW, CAENVME_DecodeError(result));
ncount++;
if (ncount==10) exit(result);
} else break;
}
return result;
}
 
int VME_BltRead(long Handle, unsigned long Address, void *Data, int size, CVAddressModifier AM, CVDataWidth DW)
{
int count=0;
CVErrorCodes result;
int ncount=0;
while (1){
result = CAENVME_BLTReadCycle(Handle, Address, Data, size, AM, DW , &count);
if (result !=cvSuccess ) {
VMEerrors++;
printf("%d CAENVME_BLTReadCycle at 0x%0lX failed! data=0x%0X AM= 0x%0X DW= 0x%0X err=%s count=%d\n", ncount,Address, *((uint32_t *) Data),AM,DW, CAENVME_DecodeError(result),count);
ncount++;
if (ncount==10) exit(result);
} else break;
}
return count;
}
 
int VME_write(long Handle, unsigned long Address, void *Data, CVAddressModifier AM, CVDataWidth DW)
{
 
CVErrorCodes result;
int ncount=0;
while (1){
result = CAENVME_WriteCycle(Handle, Address, Data, AM, DW );
if (result !=cvSuccess ) {
VMEerrors++;
printf("CAENVME_WriteCycle at 0x%0lX failed! data=0x%0X AM= 0x%0X DW= 0x%0X err=%s\n", Address, *((uint32_t *) Data),AM,DW, CAENVME_DecodeError(result));
if (ncount==10) exit(result);
} else break;
}
return result;
}
 
 
 
 
uint32_t *WStackAddrs = NULL;
uint32_t *WStackBuffer;
int WStackNCycles;
int WStackMaxCycles=100000;
CVAddressModifier *WStackAMs;
CVDataWidth *WStackDWs;
CVErrorCodes *WStackECs;
 
 
uint32_t *RStackAddrs =NULL;
int RStackNCycles;
int RStackMaxCycles=100000;
CVAddressModifier *RStackAMs;
CVDataWidth *RStackDWs;
CVErrorCodes *RStackECs;
 
 
 
int VME_appendread(unsigned long Address, void *Data, CVAddressModifier AM, CVDataWidth DW){
if (RStackNCycles<RStackMaxCycles){
RStackAddrs[RStackNCycles] = Address;
RStackAMs[RStackNCycles] = AM;
RStackDWs[RStackNCycles] = DW;
//int i=RStackNCycles;
//printf("AppendRead %d ADDR= 0x%0X AM= 0x%0X DW= 0x%0X \n", i,RStackAddrs[i],RStackAMs[i], RStackDWs[i]);
RStackNCycles++;
} else {
printf("Increase DataBuffer RStackMaxCycles =%d\n", RStackMaxCycles);
}
return RStackNCycles;
}
 
int VME_appendwrite(unsigned long Address, void *Data, CVAddressModifier AM, CVDataWidth DW){
if (WStackNCycles<WStackMaxCycles){
WStackAddrs[WStackNCycles] = Address;
WStackBuffer[WStackNCycles] = *((uint32_t *) Data);
WStackAMs[WStackNCycles] = AM;
WStackDWs[WStackNCycles] = DW;
WStackNCycles++;
} else {
printf("Increase DataBuffer WStackMaxCycles =%d\n", WStackMaxCycles);
}
return 0;
}
 
int VME_MultiReadReset(){
RStackNCycles=0;
if (RStackAddrs!=NULL) return 0;
RStackAddrs = (uint32_t *) malloc( RStackMaxCycles*sizeof(uint32_t));
RStackAMs = (CVAddressModifier *) malloc(RStackMaxCycles*sizeof(CVAddressModifier));
RStackDWs = (CVDataWidth *) malloc(RStackMaxCycles*sizeof(CVDataWidth));
RStackECs = (CVErrorCodes *) malloc(RStackMaxCycles*sizeof(CVErrorCodes));
return 0;
}
 
int VME_MultiWriteReset(){
WStackNCycles=0;
if (WStackAddrs!=NULL) return 0;
WStackBuffer = (uint32_t *) malloc( WStackMaxCycles*sizeof(uint32_t));
WStackAddrs = (uint32_t *) malloc( WStackMaxCycles*sizeof(uint32_t));
WStackAMs = (CVAddressModifier *) malloc(WStackMaxCycles*sizeof(CVAddressModifier));
WStackDWs = (CVDataWidth *) malloc(WStackMaxCycles*sizeof(CVDataWidth));
WStackECs = (CVErrorCodes *) malloc(WStackMaxCycles*sizeof(CVErrorCodes));
return 0;
}
 
int VME_MultiReadExecute(long Handle, uint32_t * Data){
//printf("len=%d\n",RStackNCycles);
int i=0;
CVErrorCodes result =CAENVME_MultiRead(Handle, RStackAddrs, Data, RStackNCycles, RStackAMs, RStackDWs, RStackECs);
if (result !=cvSuccess ) {
VMEerrors++;
printf("CAENVME_MultiRead at 0x%0X failed! err=%s RStackNCycles=%d\n", RStackAddrs[0], CAENVME_DecodeError(result), RStackNCycles);
for (i=0;i<RStackNCycles;i++){
if (RStackECs[i]!=cvSuccess ) printf("%d ADDR= 0x%0X AM= 0x%0X DW= 0x%0X failed! err=%s\n", i,RStackAddrs[i],RStackAMs[i], RStackDWs[i], CAENVME_DecodeError(RStackECs[i]) );
}
exit(result);
}
return RStackNCycles;
}
 
int VME_MultiWriteExecute(long Handle){
int i=0;
CVErrorCodes result =CAENVME_MultiWrite(Handle, WStackAddrs, WStackBuffer, WStackNCycles, WStackAMs, WStackDWs, WStackECs);
if (result !=cvSuccess ) {
printf("CAENVME_MultiWrite at 0x%0X failed! err=%s WStackNCycles=%d\n", WStackAddrs[0], CAENVME_DecodeError(result), WStackNCycles);
for (i=0;i<WStackNCycles;i++){
if (WStackECs[i]!=cvSuccess )
printf("%d ADDR= 0x%0X AM= 0x%0X DW= 0x%0X data= 0x%0X failed! err=%s\n", i,WStackAddrs[i],WStackAMs[i], WStackDWs[i], WStackBuffer[i], CAENVME_DecodeError(WStackECs[i]) );
}
exit(result);
}
return WStackNCycles;
}
 
 
 
 
 
/pts/PtsModule_CVI.c
0,0 → 1,473
 
 
 
#include <cvirte.h>
 
#include "PtsModule.h"
#include <userint.h>
#include "PtsModule_CVI.h"
#include <utility.h>
#include <formatio.h>
static int p1;
 
// ./pts -a 0x1000000 -v 1 -w 2 turn LED ON
// ./pts -a 0x1000000 -v 1 -w 1 turn LED OFF
#include <stdlib.h>
#include <stdio.h>
 
#include <ctype.h>
 
#include <string.h>
 
 
#ifndef CAEN_V1718
//typedef unsigned long uint32_t;
#endif
/*
void Delay(double t){
usleep(t*1e6);
}
*/
 
 
 
int verbose;
uint32_t ptaddr=0;
char str[255];
 
int Pts_write(uint32_t addr, uint32_t data ){
int i;
VME_A32D32_W(ptaddr+addr,&data);
return 0;
}
 
int Pts_Mwrite(uint32_t addr, uint32_t data ){
int i;
VME_A32D32_MW(ptaddr+addr,&data);
return 0;
}
 
int Pts_read(uint32_t addr, uint32_t *data ){
VME_A32D32_R(ptaddr+addr,data);
return 0;
}
 
 
int Pts_erase( int verbose ) {
uint32_t dum;
Pts_write( ADR_CSR1, 0 );
Delay(0.1);
Pts_read( ADR_CSR1, &dum);
if( verbose ) {
sprintf(str, "CSR1(0x%02x) = 0x%04x\n", ADR_CSR1,dum & 0xffff );
SetCtrlVal (p1, P1_RESPONSE, str);
}
Pts_write( ADR_CSR1, CSR1_PROGRAM_ );
Delay(0.1);
Pts_read( ADR_CSR1, &dum);
if( verbose ) {
sprintf( str, "CSR1(0x%02x) = 0x%04x\n", ADR_CSR1, dum & 0xffff );
SetCtrlVal (p1, P1_RESPONSE, str);
}
return 1;
}
 
int Pts_configure_bit( const char *filename, int mode, int verbose ) {
int c,j;
int dummyword;
FILE *fp;
const long byte_per_dot = BYTE_PER_DOT;
unsigned long nchar = 0;
 
if( ( fp = fopen( filename, "rb" ) ) == NULL ) {
if( verbose ) {
sprintf( str, "cannot open \"%s\"\n", filename );
SetCtrlVal (p1, P1_RESPONSE, str);
}
return -1;
}
if(verbose) sprintf( str, "file \"%s\" opened.\n", filename );
/* ------------------------------------------------------------ *\
The data for the configuration start from 0xffff_ffff_aa99_aa66
( cf. xapp138; we don't know the definition of the BIT file )
\* ------------------------------------------------------------ */
dummyword = 0;
do{
if( (c = getc( fp )) == EOF ) {
if(verbose) {
sprintf(str, "EOF detected. Exit.\n");
SetCtrlVal (p1, P1_RESPONSE, str);
}
return -1;
}
(c == 0xff) ? dummyword++ : (dummyword=0);
} while( dummyword < 4 );
 
// const long byte_per_dot = BYTE_PER_DOT;
// unsigned long nchar = 0;
if( mode == SLAVESERIAL_MODE ) {
if(verbose) SetCtrlVal(p1,P1_RESPONSE,"slave serial mode");
Pts_write( ADR_MODE, mode );
Pts_erase( verbose );
for( j=0; j<32; j++ ) Pts_write( ADR_CFG, 0x1 );
while( (c=getc(fp))!=EOF ){
for( j=0; j<8; j++ ) Pts_write( ADR_CFG, (c>>(7-j))&0x1 );
nchar++;
if( verbose && nchar%byte_per_dot==0 ) {
sprintf( str,"#");
SetCtrlVal(p1,P1_RESPONSE,str);
}
}
} else if( mode == SELECTMAP_MODE ) {
if( verbose ) SetCtrlVal(p1,P1_RESPONSE,"select map mode\n");
Pts_write( ADR_MODE, SELECTMAP_MODE );
Pts_erase( verbose );
for( j=0; j<4; j++ ) Pts_write( ADR_CFG, 0xff );
VME_MWRST();
while( (c=getc(fp))!=EOF ){
int cc = 0;
for(j=0; j<8; j++) cc |= ((c&(1<<j))>>j)<<(7-j);
Pts_Mwrite( ADR_CFG, cc );
nchar++;
if( verbose && nchar%byte_per_dot==0 ){
VME_MWEXEC();
VME_MWRST();
sprintf( str,"#");
SetCtrlVal(p1,P1_RESPONSE,str);
}
}
VME_MWEXEC();
} else {
if(verbose) {
sprintf(str, "\nIllegal mode\n");
SetCtrlVal(p1,P1_RESPONSE,str);
}
return -1;
}
if(verbose) {
sprintf(str,"\ntotal %ld bits\n", nchar);
SetCtrlVal(p1,P1_RESPONSE,str);
}
fclose(fp);
return Pts_check_configure( verbose );
}
 
int Pts_check_configure( int verbose ) {
uint32_t csr1_value;
Pts_read(ADR_CSR1,&csr1_value);
if(verbose) {
sprintf( str,"CSR1(0x%02x)=0x%04x\n",ADR_CSR1,csr1_value&0xffff);
SetCtrlVal(p1,P1_RESPONSE,str);
}
if(csr1_value&CSR1_DONE) {
if(verbose) SetCtrlVal(p1,P1_RESPONSE, "configure complete.\n");
return 1;
} else {
if(verbose) SetCtrlVal(p1,P1_RESPONSE,"configure not complete.");
return -1;
}
}
 
int Pts_reset( int verbose ) {
Pts_write(ADR_CSR0,1);
if( verbose ) {
sprintf( str, "CSR0(0x%02x) = 0x01\n", ADR_CSR0 );
SetCtrlVal(p1,P1_RESPONSE,str);
}
return 1;
}
 
int Pts_write_csr( int verbose, uint32_t value ) {
Pts_write(ADR_CSR0,value);
if( verbose ) {
sprintf( str,"Pts_write_csr 0x%08x\n", value );
SetCtrlVal(p1,P1_RESPONSE,str);
}
return 1;
}
 
 
void help(char *argv){
sprintf(str,"Usage: %s -a ptsaddr -v verbose -c .... Pts_check_configure\n", argv);
SetCtrlVal(p1,P1_RESPONSE,str);
sprintf(str,"Usage: %s -a ptsaddr -v verbose -i filename -b mode (2) ... Pts_configure_bit\n", argv);
SetCtrlVal(p1,P1_RESPONSE,str);
sprintf(str,"Usage: %s -a ptsaddr -v verbose -e .... Pts_erase\n", argv);
SetCtrlVal(p1,P1_RESPONSE,str);
sprintf(str,"Usage: %s -a ptsaddr -v verbose -x .... Pts_reset\n", argv);
SetCtrlVal(p1,P1_RESPONSE,str);
sprintf(str,"Usage: %s -a ptsaddr -v verbose -c .... Pts_check_configure\n", argv);
SetCtrlVal(p1,P1_RESPONSE,str);
sprintf(str,"Usage: %s -a ptsaddr -v verbose -r .... vme read\n", argv);
SetCtrlVal(p1,P1_RESPONSE,str);
sprintf(str,"Usage: %s -a ptsaddr -v verbose -w value .... vme write\n", argv);
SetCtrlVal(p1,P1_RESPONSE,str);
sprintf(str,"Usage: %s -a ptsaddr -v verbose -s value .... Pts_write_csr\n", argv);
SetCtrlVal(p1,P1_RESPONSE,str);
sprintf(str,"Example: %s --address 0x1000000 --verbose 1 --erase\n", argv);
SetCtrlVal(p1,P1_RESPONSE,str);
sprintf(str,"Example: %s --address 0x1000000 --verbose 1 --input pts_scaler.bit --load-bit 2\n", argv);
SetCtrlVal(p1,P1_RESPONSE,str);
sprintf(str,"Example: %s --address 0x1000004 --write-csr 0x7600\n", argv);SetCtrlVal(p1,P1_RESPONSE,str);
}
 
 
 
int __stdcall WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpszCmdLine, int nCmdShow)
{
char saddr[255];
if (InitCVIRTE (hInstance, 0, 0) == 0)
return -1; /* out of memory */
if ((p1 = LoadPanel (0, "PtsModule_CVI.uir", P1)) < 0)
return -1;
DisplayPanel (p1);
VME_START(NULL);
GetCtrlVal(p1,P1_VERBOSE,&verbose);
GetCtrlVal(p1,P1_ADDRESS,saddr);
ptaddr = strtoul (saddr,NULL,0);
RunUserInterface ();
DiscardPanel (p1);
VME_STOP();
return 0;
}
 
int CVICALLBACK Reset (int panel, int control, int event,
void *callbackData, int eventData1, int eventData2)
{
switch (event)
{
case EVENT_COMMIT:
Pts_reset(verbose);
break;
}
return 0;
}
 
int CVICALLBACK Erase (int panel, int control, int event,
void *callbackData, int eventData1, int eventData2)
{
switch (event)
{
case EVENT_COMMIT:
Pts_erase(verbose);
break;
}
return 0;
}
 
int CVICALLBACK Download (int panel, int control, int event,
void *callbackData, int eventData1, int eventData2)
{
char filename[254];
int mode=0;
switch (event)
{
case EVENT_COMMIT:
GetCtrlVal(p1,P1_FIRMWARE,filename);
GetCtrlVal(p1,P1_MODE,&mode);
Pts_configure_bit( filename, mode, verbose );
break;
}
return 0;
}
 
int CVICALLBACK Check (int panel, int control, int event,
void *callbackData, int eventData1, int eventData2)
{
switch (event)
{
case EVENT_COMMIT:
Pts_check_configure( verbose );
break;
}
return 0;
}
 
int CVICALLBACK Read (int panel, int control, int event,
void *callbackData, int eventData1, int eventData2)
{
uint32_t value=0;
char str[0xFF];
char saddr[256];
int offset;
switch (event)
{
case EVENT_COMMIT:
GetCtrlVal(p1,P1_OFFSET,saddr);
offset = strtoul (saddr,NULL,0);
Pts_read( offset , &value );
if( verbose ) {
sprintf(str, "VME Read addr 0x%0x+0x%0x response 0x%0x\n", ptaddr, offset, value );
SetCtrlVal (p1, P1_RESPONSE, str);
}
break;
}
return 0;
}
 
int CVICALLBACK Write (int panel, int control, int event,
void *callbackData, int eventData1, int eventData2)
{
int value;
int offset;
char svalue[256];
char saddr[256];
switch (event)
{
case EVENT_COMMIT:
GetCtrlVal(p1,P1_DATA,svalue);
GetCtrlVal(p1,P1_OFFSET,saddr);
value = strtoul (svalue,NULL,0);
offset = strtoul (saddr,NULL,0);
Pts_write( offset , value );
if( verbose ) {
sprintf(str, "VME Write addr 0x%0x+0x%0x data 0x%0x\n", ptaddr, offset, value );
SetCtrlVal (p1, P1_RESPONSE, str);
}
break;
}
return 0;
}
 
int CVICALLBACK WriteCSR (int panel, int control, int event,
void *callbackData, int eventData1, int eventData2)
{
int value;
char svalue[256];
switch (event)
{
case EVENT_COMMIT:
GetCtrlVal(p1,P1_DATA,svalue);
value = strtoul (svalue,NULL,0);
Pts_write_csr( verbose, value );
break;
}
return 0;
}
 
int CVICALLBACK Verbose (int panel, int control, int event,
void *callbackData, int eventData1, int eventData2)
{
int * data;
switch (event)
{
case EVENT_COMMIT:
GetCtrlVal(panel,control,&verbose);
break;
}
return 0;
}
 
int CVICALLBACK Help (int panel, int control, int event,
void *callbackData, int eventData1, int eventData2)
{
switch (event)
{
case EVENT_COMMIT:
help("PtsModule");
break;
}
return 0;
}
 
int CVICALLBACK Address (int panel, int control, int event,
void *callbackData, int eventData1, int eventData2)
{
char saddr[100];
switch (event)
{
case EVENT_COMMIT:
GetCtrlVal(p1,P1_ADDRESS,saddr);
ptaddr = strtoul (saddr,NULL,0);
break;
}
return 0;
}
 
int CVICALLBACK Exit (int panel, int control, int event,
void *callbackData, int eventData1, int eventData2)
{
switch (event)
{
case EVENT_COMMIT:
QuitUserInterface(0);
break;
}
return 0;
}
 
int CVICALLBACK FSelect (int panel, int control, int event,
void *callbackData, int eventData1, int eventData2)
{
int status;
char pathName[MAX_PATHNAME_LEN];
switch (event)
{
case EVENT_COMMIT:
status = FileSelectPopup ("", "*.bit", "*.bit", "Select Firmware file",
VAL_SELECT_BUTTON, 0, 0, 1, 0, pathName);
if (status>0) SetCtrlVal(p1,P1_FIRMWARE,pathName);
break;
}
return 0;
}
 
int CVICALLBACK LedCB (int panel, int control, int event,
void *callbackData, int eventData1, int eventData2)
{
switch (event)
{
int value=0;
case EVENT_COMMIT:
GetCtrlVal(p1,P1_LED,&value);
Pts_write( 0 , value+1 );
break;
}
return 0;
}
 
int CVICALLBACK Execute (int panel, int control, int event,
void *callbackData, int eventData1, int eventData2)
{
switch (event)
{
case EVENT_COMMIT:{
int n,i,nb;
char buf[400];
unsigned int data, addr;
char sdata[255], saddr[255], rw[255];
GetNumTextBoxLines(panel, P1_COMMANDS,&n);
for (i=0;i<n;i++){
GetTextBoxLine(panel, P1_COMMANDS, i, buf);
nb = sscanf(buf,"%s%s%s",rw, saddr,sdata);
addr = strtoul (saddr,NULL,0);
data = strtoul (sdata,NULL,0);
if (strstr(rw,"W")!=NULL){
Pts_write( addr , data );
if( verbose ) {
sprintf(str, "VME Write addr 0x%0x+0x%0x data 0x%0x\n", ptaddr, addr, data );
SetCtrlVal (p1, P1_RESPONSE, str);
}
} else {
Pts_read( addr , &data );
if( verbose ) {
sprintf(str, "VME Read addr 0x%0x+0x%0x response 0x%0x\n", ptaddr, addr, data);
SetCtrlVal (p1, P1_RESPONSE, str);
}
}
}
break;
}
}
return 0;
}
/pts/CAEN_V1718.h
0,0 → 1,94
#ifndef _CAEN_V1718_H
#define _CAEN_V1718_H
 
#include <CAENVMElib.h>
 
extern int32_t udev;
extern int VMEerrors;
 
 
int VME_start (char*);
int VME_close (int);
int VME_stop (void);
int VME_reset (void);
 
int VME_BltRead(long Handle, unsigned long Address, void *Data,int size, CVAddressModifier AM, CVDataWidth DW);
int VME_read(long Handle, unsigned long Address, void *Data, CVAddressModifier AM, CVDataWidth DW);
int VME_write(long Handle, unsigned long Address, void *Data, CVAddressModifier AM, CVDataWidth DW);
int VME_appendread(unsigned long Address, void *Data, CVAddressModifier AM, CVDataWidth DW);
int VME_appendwrite(unsigned long Address, void *Data, CVAddressModifier AM, CVDataWidth DW);
 
int VME_MultiReadReset( void);
int VME_MultiWriteReset( void);
int VME_MultiReadExecute(long Handle, uint32_t *Data);
int VME_MultiWriteExecute(long Handle);
 
#define VME_START(NODE) VME_start((NODE))
#define VME_STOP() CAENVME_End(udev)
#define VME_RESET() CAENVME_SystemReset(udev)
 
#define VME_A16D8_R(VME,DATA) VME_read( udev, (VME), (DATA) , cvA16_U_DATA, cvD8)
#define VME_A16D16_R(VME,DATA) VME_read( udev, (VME), (DATA) , cvA16_U_DATA, cvD16)
#define VME_A16D32_R(VME,DATA) VME_read( udev, (VME), (DATA) , cvA16_U_DATA, cvD32)
 
#define VME_A24D8_R(VME,DATA) VME_read( udev, (VME), (DATA) , cvA24_U_DATA, cvD8)
#define VME_A24D16_R(VME,DATA) VME_read( udev, (VME), (DATA) , cvA24_U_DATA, cvD16)
#define VME_A24D32_R(VME,DATA) VME_read( udev, (VME), (DATA) , cvA24_U_DATA, cvD32)
 
#define VME_A32D8_R(VME,DATA) VME_read( udev, (VME), (DATA) , cvA32_U_DATA, cvD8)
#define VME_A32D16_R(VME,DATA) VME_read( udev, (VME), (DATA) , cvA32_U_DATA, cvD16)
#define VME_A32D32_R(VME,DATA) VME_read( udev, (VME), (DATA) , cvA32_U_DATA, cvD32)
 
#define VME_A16D8_W(VME,DATA) VME_write( udev, (VME), (DATA) , cvA16_U_DATA, cvD8)
#define VME_A16D16_W(VME,DATA) VME_write( udev, (VME), (DATA) , cvA16_U_DATA, cvD16)
#define VME_A16D32_W(VME,DATA) VME_write( udev, (VME), (DATA) , cvA16_U_DATA, cvD32)
 
#define VME_A24D8_W(VME,DATA) VME_write( udev, (VME), (DATA) , cvA24_U_DATA, cvD8)
#define VME_A24D16_W(VME,DATA) VME_write( udev, (VME), (DATA) , cvA24_U_DATA, cvD16)
#define VME_A24D32_W(VME,DATA) VME_write( udev, (VME), (DATA) , cvA24_U_DATA, cvD32)
 
#define VME_A32D8_W(VME,DATA) VME_write( udev, (VME), (DATA) , cvA32_U_DATA, cvD8)
#define VME_A32D16_W(VME,DATA) VME_write( udev, (VME), (DATA) , cvA32_U_DATA, cvD16)
#define VME_A32D32_W(VME,DATA) VME_write( udev, (VME), (DATA) , cvA32_U_DATA, cvD32)
 
 
 
#define VME_A16D8_MR(VME,DATA) VME_appendread( (VME), (DATA) , cvA16_U_DATA, cvD8)
#define VME_A16D16_MR(VME,DATA) VME_appendread( (VME), (DATA) , cvA16_U_DATA, cvD16)
#define VME_A16D32_MR(VME,DATA) VME_appendread( (VME), (DATA) , cvA16_U_DATA, cvD32)
 
#define VME_A24D8_MR(VME,DATA) VME_appendread( (VME), (DATA) , cvA24_U_DATA, cvD8)
#define VME_A24D16_MR(VME,DATA) VME_appendread( (VME), (DATA) , cvA24_U_DATA, cvD16)
#define VME_A24D32_MR(VME,DATA) VME_appendread( (VME), (DATA) , cvA24_U_DATA, cvD32)
 
#define VME_A32D8_MR(VME,DATA) VME_appendread( (VME), (DATA) , cvA32_U_DATA, cvD8)
#define VME_A32D16_MR(VME,DATA) VME_appendread( (VME), (DATA) , cvA32_U_DATA, cvD16)
#define VME_A32D32_MR(VME,DATA) VME_appendread( (VME), (DATA) , cvA32_U_DATA, cvD32)
 
#define VME_A16D8_MW(VME,DATA) VME_appendwrite( (VME), (DATA) , cvA16_U_DATA, cvD8)
#define VME_A16D16_MW(VME,DATA) VME_appendwrite( (VME), (DATA) , cvA16_U_DATA, cvD16)
#define VME_A16D32_MW(VME,DATA) VME_appendwrite( (VME), (DATA) , cvA16_U_DATA, cvD32)
 
#define VME_A24D8_MW(VME,DATA) VME_appendwrite( (VME), (DATA) , cvA24_U_DATA, cvD8)
#define VME_A24D16_MW(VME,DATA) VME_appendwrite( (VME), (DATA) , cvA24_U_DATA, cvD16)
#define VME_A24D32_MW(VME,DATA) VME_appendwrite( (VME), (DATA) , cvA24_U_DATA, cvD32)
 
#define VME_A32D8_MW(VME,DATA) VME_appendwrite( (VME), (DATA) , cvA32_U_DATA, cvD8)
#define VME_A32D16_MW(VME,DATA) VME_appendwrite( (VME), (DATA) , cvA32_U_DATA, cvD16)
#define VME_A32D32_MW(VME,DATA) VME_appendwrite( (VME), (DATA) , cvA32_U_DATA, cvD32)
 
#define VME_MWRST() VME_MultiWriteReset()
#define VME_MWEXEC() VME_MultiWriteExecute(udev)
#define VME_MRRST() VME_MultiReadReset()
#define VME_MREXEC(DATA) VME_MultiReadExecute(udev, (DATA) )
 
#define VME_A32D16BLT_R(VME,DATA,SIZE) VME_BltRead( udev, (VME), (DATA) , (SIZE) , cvA32_U_BLT, cvD16)
#define VME_A24D16BLT_R(VME,DATA,SIZE) VME_BltRead( udev, (VME), (DATA) , (SIZE) , cvA24_U_BLT, cvD16)
 
#define VME_A32D32BLT_R(VME,DATA,SIZE) VME_BltRead( udev, (VME), (DATA) , (SIZE) , cvA32_U_BLT, cvD32)
#define VME_A24D32BLT_R(VME,DATA,SIZE) VME_BltRead( udev, (VME), (DATA) , (SIZE) , cvA24_U_DATA, cvD32)
 
#define VME_A24D32BLT_READ(VME,DATA,SIZE,COUNT) CAENVME_BLTReadCycle(udev, (VME), (DATA), (SIZE), cvA24_U_BLT, cvD32 , (COUNT) )
 
 
#endif
/pts/PtsModule_CVI.prj
0,0 → 1,434
[Project Header]
Version = 1201
Pathname = "/c/home/rok/pts/PtsModule_CVI.prj"
CVI Dir = "/c/program files/national instruments/cvi2012"
CVI Shared Dir = "/C/Program Files/National Instruments/Shared/CVI"
CVI Pub Local Dir = "/C/ProgramData/National Instruments/CVI2012"
CVI Pub Global Dir = "/C/ProgramData/National Instruments/CVI"
IVI Standard Root Dir = "/C/Program Files/IVI Foundation/IVI"
VXIplug&play Framework Dir = "/C/Program Files/IVI Foundation/VISA/winnt"
IVI Standard Root 64-bit Dir = "/C/Program Files/IVI Foundation/IVI"
VXIplug&play Framework 64-bit Dir = "/C/Program Files/IVI Foundation/VISA/win64"
Number of Files = 7
Target Type = "Executable"
Flags = 2064
Copied From Locked InstrDrv Directory = False
Copied from VXIPNP Directory = False
Locked InstrDrv Name = ""
Don't Display Deploy InstrDrv Dialog = False
 
[File 0001]
File Type = "CSource"
Res Id = 1
Path Is Rel = True
Path Rel To = "Project"
Path Rel Path = "CAEN_V1718.c"
Path = "/c/home/rok/pts/CAEN_V1718.c"
Exclude = False
Compile Into Object File = False
Project Flags = 0
Folder = "Source Files"
 
[File 0002]
File Type = "Library"
Res Id = 2
Path Is Rel = True
Path Rel To = "Project"
Path Rel Path = "../../../Program Files/CAEN/VME/lib/x86/CAENVMELib.lib"
Path = "/c/Program Files/CAEN/VME/lib/x86/CAENVMELib.lib"
Exclude = False
Project Flags = 0
Folder = "Library Files"
 
[File 0003]
File Type = "Include"
Res Id = 3
Path Is Rel = True
Path Rel To = "Project"
Path Rel Path = "PtsModule.h"
Path = "/c/home/rok/pts/PtsModule.h"
Exclude = False
Project Flags = 0
Folder = "Include Files"
 
[File 0004]
File Type = "CSource"
Res Id = 4
Path Is Rel = True
Path Rel To = "Project"
Path Rel Path = "PtsModule_CVI.c"
Path = "/c/home/rok/pts/PtsModule_CVI.c"
Exclude = False
Compile Into Object File = False
Project Flags = 0
Folder = "Source Files"
 
[File 0005]
File Type = "User Interface Resource"
Res Id = 5
Path Is Rel = True
Path Rel To = "Project"
Path Rel Path = "PtsModule_CVI.uir"
Path = "/c/home/rok/pts/PtsModule_CVI.uir"
Exclude = False
Project Flags = 0
Folder = "User Interface Files"
 
[File 0006]
File Type = "Include"
Res Id = 6
Path Is Rel = True
Path Rel To = "Project"
Path Rel Path = "vme.h"
Path = "/c/home/rok/pts/vme.h"
Exclude = False
Project Flags = 0
Folder = "Include Files"
 
[File 0007]
File Type = "Function Panel"
Res Id = 7
Path Is Rel = True
Path Rel To = "CVI"
Path Rel To Override = "CVI"
Path Rel Path = "instr/WIENVME_DLL/wienvme_dll.fp"
Path = "/c/program files/national instruments/cvi2012/instr/WIENVME_DLL/wienvme_dll.fp"
Exclude = False
Project Flags = 0
Folder = "Instrument Files"
 
[Folders]
Folder 0 = "Library Files"
Folder 1 = "Source Files"
Folder 2 = "Include Files"
Folder 3 = "User Interface Files"
Folder 4 = "Instrument Files"
 
[Custom Build Configs]
Num Custom Build Configs = 0
 
[Default Build Config Debug]
Config Name = "Debug"
Is 64-Bit = False
Is Release = False
Default Calling Convention = "cdecl"
Uninitialized Locals Compile Warning = "Conservative"
Require Prototypes = True
Require Return Values = True
Enable Pointer Mismatch Warning = False
Enable Unreachable Code Warning = False
Enable Unreferenced Identifiers Warning = False
Enable Assignment In Conditional Warning = False
Enable C99 Extensions = False
Stack Size = 250000
Image Base Address = 4194304
Image Base Address x64 = 4194304
Compiler Defines = "/DWIN32_LEAN_AND_MEAN /DXXCAEN_V1718 /DWIENVME"
Sign = False
Sign Store = ""
Sign Certificate = ""
Sign Timestamp URL = ""
Sign URL = ""
Manifest Embed = False
Icon File Is Rel = False
Icon File = ""
Application Title = ""
DLL Import Library Choice = "Gen Lib For Current Mode"
Use IVI Subdirectories for Import Libraries = False
Use VXIPNP Subdirectories for Import Libraries = False
Use Dflt Import Lib Base Name = True
Where to Copy DLL = "Do not copy"
Custom Directory to Copy DLL Is Rel = False
Custom Directory to Copy DLL = ""
Generate Source Documentation = "None"
Runtime Support = "Full Runtime Support"
Runtime Binding = "Shared"
Embed Project .UIRs = False
Generate Map File = False
Create Console Application = False
Using LoadExternalModule = False
DLL Exports = "Include File Symbols"
Register ActiveX Server = False
Numeric File Version = "1,0,0,0"
Numeric Prod Version = "1,0,0,0"
Comments = ""
Comments Ex = ""
Company Name = ""
Company Name Ex = "%company"
File Description = "PtsModule_CVI (Debug x86)"
File Description Ex = "%application (%rel_dbg %arch)"
File Version = "1.0"
File Version Ex = "%f1.%f2"
Internal Name = "PtsModule_CVI_dbg"
Internal Name Ex = "%basename"
Legal Copyright = "Copyright © 2014"
Legal Copyright Ex = "Copyright © %company %Y"
Legal Trademarks = ""
Legal Trademarks Ex = ""
Original Filename = "PtsModule_CVI_dbg.exe"
Original Filename Ex = "%filename"
Private Build = ""
Private Build Ex = ""
Product Name = " PtsModule_CVI"
Product Name Ex = "%company %application"
Product Version = "1.0"
Product Version Ex = "%p1.%p2"
Special Build = ""
Special Build Ex = ""
Add Type Lib To DLL = False
Include Type Lib Help Links = False
TLB Help Style = "HLP"
Type Lib FP File Is Rel = False
Type Lib FP File = ""
 
[Default Build Config Release]
Config Name = "Release"
Is 64-Bit = False
Is Release = True
Default Calling Convention = "cdecl"
Uninitialized Locals Compile Warning = "Conservative"
Require Prototypes = True
Require Return Values = True
Enable Pointer Mismatch Warning = False
Enable Unreachable Code Warning = False
Enable Unreferenced Identifiers Warning = False
Enable Assignment In Conditional Warning = False
Enable C99 Extensions = False
Stack Size = 250000
Image Base Address = 4194304
Image Base Address x64 = 4194304
Compiler Defines = "/DWIN32_LEAN_AND_MEAN /DCAEN_V1718"
Sign = False
Sign Store = ""
Sign Certificate = ""
Sign Timestamp URL = ""
Sign URL = ""
Manifest Embed = False
Icon File Is Rel = False
Icon File = ""
Application Title = ""
DLL Import Library Choice = "Gen Lib For Current Mode"
Use IVI Subdirectories for Import Libraries = False
Use VXIPNP Subdirectories for Import Libraries = False
Use Dflt Import Lib Base Name = True
Where to Copy DLL = "Do not copy"
Custom Directory to Copy DLL Is Rel = False
Custom Directory to Copy DLL = ""
Generate Source Documentation = "None"
Runtime Support = "Full Runtime Support"
Runtime Binding = "Shared"
Embed Project .UIRs = False
Generate Map File = False
Create Console Application = False
Using LoadExternalModule = False
DLL Exports = "Include File Symbols"
Register ActiveX Server = False
Add Type Lib To DLL = False
Include Type Lib Help Links = False
TLB Help Style = "HLP"
Type Lib FP File Is Rel = False
Type Lib FP File = ""
 
[Default Build Config Debug64]
Config Name = "Debug64"
Is 64-Bit = True
Is Release = False
Default Calling Convention = "cdecl"
Uninitialized Locals Compile Warning = "Conservative"
Require Prototypes = True
Require Return Values = True
Enable Pointer Mismatch Warning = False
Enable Unreachable Code Warning = False
Enable Unreferenced Identifiers Warning = False
Enable Assignment In Conditional Warning = False
Enable C99 Extensions = False
Stack Size = 250000
Image Base Address = 4194304
Image Base Address x64 = 4194304
Compiler Defines = "/DWIN32_LEAN_AND_MEAN /DCAEN_V1718"
Sign = False
Sign Store = ""
Sign Certificate = ""
Sign Timestamp URL = ""
Sign URL = ""
Manifest Embed = False
Icon File Is Rel = False
Icon File = ""
Application Title = ""
DLL Import Library Choice = "Gen Lib For Current Mode"
Use IVI Subdirectories for Import Libraries = False
Use VXIPNP Subdirectories for Import Libraries = False
Use Dflt Import Lib Base Name = True
Where to Copy DLL = "Do not copy"
Custom Directory to Copy DLL Is Rel = False
Custom Directory to Copy DLL = ""
Generate Source Documentation = "None"
Runtime Support = "Full Runtime Support"
Runtime Binding = "Shared"
Embed Project .UIRs = False
Generate Map File = False
Create Console Application = False
Using LoadExternalModule = False
DLL Exports = "Include File Symbols"
Register ActiveX Server = False
Add Type Lib To DLL = False
Include Type Lib Help Links = False
TLB Help Style = "HLP"
Type Lib FP File Is Rel = False
Type Lib FP File = ""
 
[Default Build Config Release64]
Config Name = "Release64"
Is 64-Bit = True
Is Release = True
Default Calling Convention = "cdecl"
Uninitialized Locals Compile Warning = "Conservative"
Require Prototypes = True
Require Return Values = True
Enable Pointer Mismatch Warning = False
Enable Unreachable Code Warning = False
Enable Unreferenced Identifiers Warning = False
Enable Assignment In Conditional Warning = False
Enable C99 Extensions = False
Stack Size = 250000
Image Base Address = 4194304
Image Base Address x64 = 4194304
Compiler Defines = "/DWIN32_LEAN_AND_MEAN /DCAEN_V1718"
Sign = False
Sign Store = ""
Sign Certificate = ""
Sign Timestamp URL = ""
Sign URL = ""
Manifest Embed = False
Icon File Is Rel = False
Icon File = ""
Application Title = ""
DLL Import Library Choice = "Gen Lib For Current Mode"
Use IVI Subdirectories for Import Libraries = False
Use VXIPNP Subdirectories for Import Libraries = False
Use Dflt Import Lib Base Name = True
Where to Copy DLL = "Do not copy"
Custom Directory to Copy DLL Is Rel = False
Custom Directory to Copy DLL = ""
Generate Source Documentation = "None"
Runtime Support = "Full Runtime Support"
Runtime Binding = "Shared"
Embed Project .UIRs = False
Generate Map File = False
Create Console Application = False
Using LoadExternalModule = False
DLL Exports = "Include File Symbols"
Register ActiveX Server = False
Add Type Lib To DLL = False
Include Type Lib Help Links = False
TLB Help Style = "HLP"
Type Lib FP File Is Rel = False
Type Lib FP File = ""
 
[Compiler Options]
Default Calling Convention = "cdecl"
Require Prototypes = True
Require Return Values = True
Enable Pointer Mismatch Warning = False
Enable Unreachable Code Warning = False
Enable Unreferenced Identifiers Warning = False
Enable Assignment In Conditional Warning = False
O Option Compatible With 5.0 = False
Enable C99 Extensions = False
Uninitialized Locals Compile Warning = "Conservative"
Precompile Prefix Header = False
Prefix Header File = ""
 
[Run Options]
Stack Size = 250000
Image Base Address = 4194304
Image Base Address x64 = 4194304
 
[Compiler Defines]
Compiler Defines = "/DWIN32_LEAN_AND_MEAN /DCAEN_V1718"
 
[Include Paths]
Include Path 1 Is Rel = True
Include Path 1 Rel To = "Project"
Include Path 1 Rel Path = ""
Include Path 1 = "/c/home/rok/pts"
 
[Create Executable]
Executable File_Debug Is Rel = True
Executable File_Debug Rel To = "Project"
Executable File_Debug Rel Path = "PtsModule_CVI_dbg.exe"
Executable File_Debug = "/c/home/rok/pts/PtsModule_CVI_dbg.exe"
Executable File_Release Is Rel = True
Executable File_Release Rel To = "Project"
Executable File_Release Rel Path = "PtsModule_CVI.exe"
Executable File_Release = "/c/home/rok/pts/PtsModule_CVI.exe"
Executable File_Debug64 Is Rel = True
Executable File_Debug64 Rel To = "Project"
Executable File_Debug64 Rel Path = "PtsModule_CVI.exe"
Executable File_Debug64 = "/c/home/rok/pts/PtsModule_CVI.exe"
Executable File_Release64 Is Rel = True
Executable File_Release64 Rel To = "Project"
Executable File_Release64 Rel Path = "PtsModule_CVI.exe"
Executable File_Release64 = "/c/home/rok/pts/PtsModule_CVI.exe"
Icon File Is Rel = False
Icon File = ""
Application Title = ""
DLL Exports = "Include File Symbols"
DLL Import Library Choice = "Gen Lib For Current Mode"
Use IVI Subdirectories for Import Libraries = False
Use VXIPNP Subdirectories for Import Libraries = False
Use Dflt Import Lib Base Name = True
Where to Copy DLL = "Do not copy"
Custom Directory to Copy DLL Is Rel = False
Custom Directory to Copy DLL = ""
Generate Source Documentation = "None"
Add Type Lib To DLL = False
Include Type Lib Help Links = False
TLB Help Style = "HLP"
Type Lib FP File Is Rel = False
Type Lib FP File = ""
Type Lib Guid = ""
Runtime Support = "Full Runtime Support"
Instrument Driver Support Only = False
Embed Project .UIRs = False
Generate Map File = False
 
[External Compiler Support]
UIR Callbacks File Option = 0
Using LoadExternalModule = False
Create Project Symbols File = True
UIR Callbacks Obj File Is Rel = False
UIR Callbacks Obj File = ""
Project Symbols H File Is Rel = False
Project Symbols H File = ""
Project Symbols Obj File Is Rel = False
Project Symbols Obj File = ""
 
[ActiveX Server Options]
Specification File Is Rel = False
Specification File = ""
Source File Is Rel = False
Source File = ""
Include File Is Rel = False
Include File = ""
IDL File Is Rel = False
IDL File = ""
Register ActiveX Server = False
 
[Signing Info]
Sign = False
Sign Debug Build = False
Store = ""
Certificate = ""
Timestamp URL = ""
URL = ""
 
[Manifest Info]
Embed = False
 
[tpcSection]
tpcEnabled = 0
tpcOverrideEnvironment = 0
tpcEnabled x64 = 0
tpcOverrideEnvironment x64 = 0
 
/pts/PtsModule_CVI.uir
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: vme.h
===================================================================
--- vme.h (revision 51)
+++ vme.h (revision 52)
@@ -1,7 +1,11 @@
#ifndef _VME_H_
#define _VME_H_
-#define _VI_FUNC
+#ifdef WIENVME
+
+#ifdef _CVI_
+#include "c:\Program Files\National Instruments\CVI2012\instr\WIENVME_DLL\wienvme_dll.h"
+#else
#include "wienvme_dll.h"
#endif
@@ -11,3 +15,14 @@
#define VME_A24D32_MW VME_A24D32_W
#define VME_A24D32_MR VME_A24D32_R
+
+#define VME_A32D32_MW VME_A32D32_W
+#define VME_A32D32_MR VME_A32D32_R
+
+#endif
+
+#ifdef CAEN_V1718
+#include "CAEN_V1718.h"
+#endif
+
+#endif