/pts/PtsModule_CVI.uir |
Cannot display: file marked as a binary type.
|
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
## -1 +0,0 ## |
-application/octet-stream |
\ No newline at end of property |
Index: PtsModule_CVI.c |
=================================================================== |
--- PtsModule_CVI.c (revision 52) |
+++ PtsModule_CVI.c (nonexistent) |
@@ -1,473 +0,0 @@ |
- |
- |
- |
-#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; |
-} |
Index: CAENVMEoslib.h |
=================================================================== |
--- CAENVMEoslib.h (revision 52) |
+++ CAENVMEoslib.h (nonexistent) |
@@ -1,36 +0,0 @@ |
-/* |
- ----------------------------------------------------------------------------- |
- |
- --- 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 |
Index: CAENVMElib.h |
=================================================================== |
--- CAENVMElib.h (revision 52) |
+++ CAENVMElib.h (nonexistent) |
@@ -1,1325 +0,0 @@ |
-/*! |
- ----------------------------------------------------------------------------- |
- |
- --- 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 |
Index: CAENVMEtypes.h |
=================================================================== |
--- CAENVMEtypes.h (revision 52) |
+++ CAENVMEtypes.h (nonexistent) |
@@ -1,344 +0,0 @@ |
-/* |
- ----------------------------------------------------------------------------- |
- |
- --- 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 |
Index: pcivme_ni.h |
=================================================================== |
--- pcivme_ni.h (revision 52) |
+++ pcivme_ni.h (revision 15) |
@@ -15,9 +15,9 @@ |
// |
// Please announce changes and hints to ARW Elektronik |
// |
-// $Log: pcivme_ni.h,v $ |
-// Revision 1.8 2004/08/13 19:23:45 klaus |
-// conversion to kernel-version 2.6, released version 3.0 |
+// $Log: pcivme_ni.h,v $ |
+// Revision 1.8 2004/08/13 19:23:45 klaus |
+// conversion to kernel-version 2.6, released version 3.0 |
// |
// Revision 1.7 2002/10/20 18:07:18 klaus |
// changed error handling |
Index: vme.h |
=================================================================== |
--- vme.h (revision 52) |
+++ vme.h (revision 15) |
@@ -1,28 +1,13 @@ |
-#ifndef _VME_H_ |
-#define _VME_H_ |
- |
-#ifdef WIENVME |
- |
-#ifdef _CVI_ |
-#include "c:\Program Files\National Instruments\CVI2012\instr\WIENVME_DLL\wienvme_dll.h" |
-#else |
-#include "wienvme_dll.h" |
-#endif |
- |
-#define VME_MWEXEC() |
-#define VME_MWRST() |
-#define VME_MRRST() |
- |
-#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 |
+#ifndef _VME_H_ |
+#define _VME_H_ |
+ |
+#define _VI_FUNC |
+#include "wienvme_dll.h" |
+#endif |
+ |
+#define VME_MWEXEC() |
+#define VME_MWRST() |
+#define VME_MRRST() |
+ |
+#define VME_A24D32_MW VME_A24D32_W |
+#define VME_A24D32_MR VME_A24D32_R |