00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __CAENVMETYPES_H
00019 #define __CAENVMETYPES_H
00020
00021 #ifdef LINUX
00022 #define CAEN_BYTE unsigned char
00023 #define CAEN_BOOL int
00024 #else
00025 #define CAEN_BYTE byte
00026 #define CAEN_BOOL VARIANT_BOOL
00027 #endif
00028
00029
00030
00031
00032 typedef enum CVBoardTypes {
00033 cvV1718 = 0,
00034 cvV2718 = 1,
00035 cvA2818 = 2,
00036 cvA2719 = 3
00037 } CVBoardTypes;
00038
00039
00040
00041
00042
00043 typedef enum CVDataWidth {
00044 cvD8 = 0x01,
00045 cvD16 = 0x02,
00046 cvD32 = 0x04,
00047 cvD64 = 0x08,
00048 cvD16_swapped = 0x12,
00049 cvD32_swapped = 0x14,
00050 cvD64_swapped = 0x18
00051 } CVDataWidth;
00052
00053
00054
00055
00056 typedef enum CVAddressModifier {
00057 cvA16_S = 0x2D,
00058 cvA16_U = 0x29,
00059 cvA16_LCK = 0x2C,
00060
00061 cvA24_S_BLT = 0x3F,
00062 cvA24_S_PGM = 0x3E,
00063 cvA24_S_DATA = 0x3D,
00064 cvA24_S_MBLT = 0x3C,
00065 cvA24_U_BLT = 0x3B,
00066 cvA24_U_PGM = 0x3A,
00067 cvA24_U_DATA = 0x39,
00068 cvA24_U_MBLT = 0x38,
00069 cvA24_LCK = 0x32,
00070
00071 cvA32_S_BLT = 0x0F,
00072 cvA32_S_PGM = 0x0E,
00073 cvA32_S_DATA = 0x0D,
00074 cvA32_S_MBLT = 0x0C,
00075 cvA32_U_BLT = 0x0B,
00076 cvA32_U_PGM = 0x0A,
00077 cvA32_U_DATA = 0x09,
00078 cvA32_U_MBLT = 0x08,
00079 cvA32_LCK = 0x05,
00080
00081 cvCR_CSR = 0x2F,
00082
00083
00084
00085
00086
00087 cvA40_BLT = 0x37,
00088 cvA40_LCK = 0x35,
00089 cvA40 = 0x34,
00090
00091 cvA64 = 0x01,
00092 cvA64_BLT = 0x03,
00093 cvA64_MBLT = 0x00,
00094 cvA64_LCK = 0x04,
00095
00096 cvA3U_2eVME = 0x21,
00097 cvA6U_2eVME = 0x20
00098 } CVAddressModifier;
00099
00100
00101
00102
00103 typedef enum CVErrorCodes {
00104 cvSuccess = 0,
00105 cvBusError = -1,
00106 cvCommError = -2,
00107 cvGenericError = -3,
00108 cvInvalidParam = -4,
00109 cvTimeoutError = -5,
00110 } CVErrorCodes;
00111
00112
00113
00114
00115 typedef enum CVPulserSelect {
00116 cvPulserA = 0,
00117 cvPulserB = 1
00118 } CVPulserSelect;
00119
00120
00121
00122
00123 typedef enum CVOutputSelect {
00124 cvOutput0 = 0,
00125 cvOutput1 = 1,
00126 cvOutput2 = 2,
00127 cvOutput3 = 3,
00128 cvOutput4 = 4
00129 } CVOutputSelect;
00130
00131
00132
00133
00134 typedef enum CVInputSelect {
00135 cvInput0 = 0,
00136 cvInput1 = 1
00137 } CVInputSelect;
00138
00139
00140
00141
00142 typedef enum CVIOSources {
00143 cvManualSW = 0,
00144 cvInputSrc0 = 1,
00145 cvInputSrc1 = 2,
00146 cvCoincidence = 3,
00147 cvVMESignals = 4,
00148 cvMiscSignals = 6
00149 } CVIOSources;
00150
00151
00152
00153
00154 typedef enum CVTimeUnits {
00155 cvUnit25ns = 0,
00156 cvUnit1600ns = 1,
00157 cvUnit410us = 2,
00158 cvUnit104ms = 3
00159 } CVTimeUnits;
00160
00161
00162
00163
00164 typedef enum CVLEDPolarity {
00165 cvActiveHigh = 0,
00166 cvActiveLow = 1
00167 } CVLEDPolarity;
00168
00169
00170
00171
00172 typedef enum CVIOPolarity {
00173 cvDirect = 0,
00174 cvInverted = 1
00175 } CVIOPolarity;
00176
00177
00178
00179
00180 typedef enum CVRegisters {
00181 cvStatusReg = 0x00,
00182 cvVMEControlReg = 0x01,
00183 cvFwRelReg = 0x02,
00184 cvFwDldReg = 0x03,
00185 cvFlenaReg = 0x04,
00186 cvVMEIRQEnaReg = 0x06,
00187 cvInputReg = 0x08,
00188 cvOutRegSet = 0x0A,
00189 cvInMuxRegSet = 0x0B,
00190 cvOutMuxRegSet = 0x0C,
00191 cvLedPolRegSet = 0x0D,
00192 cvOutRegClear = 0x10,
00193 cvInMuxRegClear = 0x11,
00194 cvOutMuxRegClear = 0x12,
00195 cvLedPolRegClear = 0x13,
00196 cvPulserA0 = 0x16,
00197 cvPulserA1 = 0x17,
00198 cvPulserB0 = 0x19,
00199 cvPulserB1 = 0x1A,
00200 cvScaler0 = 0x1C,
00201 cvScaler1 = 0x1D,
00202 cvDispADL = 0x20,
00203 cvDispADH = 0x21,
00204 cvDispDTL = 0x22,
00205 cvDispDTH = 0x23,
00206 cvDispC1 = 0x24,
00207 cvDispC2 = 0x25,
00208 cvLMADL = 0x28,
00209 cvLMADH = 0x29,
00210 cvLMC = 0x2C
00211 } CVRegisters;
00212
00213
00214
00215
00216 typedef enum CVStatusRegisterBits {
00217 cvSYSRES = 0x0001,
00218 cvSYSCTRL = 0x0002,
00219 cvDTACK = 0x0010,
00220 cvBERR = 0x0020,
00221 cvDIP0 = 0x0100,
00222 cvDIP1 = 0x0200,
00223 cvDIP2 = 0x0400,
00224 cvDIP3 = 0x0800,
00225 cvDIP4 = 0x1000,
00226 cvUSBTYPE = 0x8000
00227 } CVStatusRegisterBits;
00228
00229
00230
00231
00232 typedef enum CVInputRegisterBits {
00233 cvIn0Bit = 0x0001,
00234 cvIn1Bit = 0x0002,
00235 cvCoincBit = 0x0004,
00236 cvPulsAOutBit = 0x0008,
00237 cvPulsBOutBit = 0x0010,
00238 cvScalEndCntBit = 0x0020,
00239 cvLocMonBit = 0x0040,
00240 } CVInputRegisterBits;
00241
00242
00243
00244
00245 typedef enum CVOutputRegisterBits {
00246 cvPulsAStartBit = 0x0001,
00247 cvPulsAResetBit = 0x0002,
00248 cvPulsBStartBit = 0x0004,
00249 cvPulsBResetBit = 0x0008,
00250 cvScalGateBit = 0x0010,
00251 cvScalResetBit = 0x0020,
00252 cvOut0Bit = 0x0040,
00253 cvOut1Bit = 0x0080,
00254 cvOut2Bit = 0x0100,
00255 cvOut3Bit = 0x0200,
00256 cvOut4Bit = 0x0400,
00257 } CVOutputRegisterBits;
00258
00259
00260
00261
00262 typedef enum CVArbiterTypes {
00263 cvPriorized = 0,
00264 cvRoundRobin = 1
00265 } CVArbiterTypes;
00266
00267
00268
00269
00270 typedef enum CVRequesterTypes {
00271 cvFair = 0,
00272 cvDemand = 1
00273 } CVRequesterTypes;
00274
00275
00276
00277
00278 typedef enum CVReleaseTypes {
00279 cvRWD = 0,
00280 cvROR = 1
00281 } CVReleaseTypes;
00282
00283
00284
00285
00286 typedef enum CVBusReqLevels {
00287 cvBR0 = 0,
00288 cvBR1 = 1,
00289 cvBR2 = 2,
00290 cvBR3 = 3
00291 } CVBusReqLevels;
00292
00293
00294
00295
00296 typedef enum CVIRQLevels {
00297 cvIRQ1 = 0x01,
00298 cvIRQ2 = 0x02,
00299 cvIRQ3 = 0x04,
00300 cvIRQ4 = 0x08,
00301 cvIRQ5 = 0x10,
00302 cvIRQ6 = 0x20,
00303 cvIRQ7 = 0x40
00304 } CVIRQLevels;
00305
00306
00307
00308
00309 typedef enum CVVMETimeouts {
00310 cvTimeout50us = 0,
00311 cvTimeout400us = 1
00312 } CVVMETimeouts;
00313
00314
00315
00316
00317 typedef struct CVDisplay {
00318 long cvAddress;
00319 long cvData;
00320 long cvAM;
00321 long cvIRQ;
00322 CAEN_BOOL cvDS0;
00323 CAEN_BOOL cvDS1;
00324 CAEN_BOOL cvAS;
00325 CAEN_BOOL cvIACK;
00326 CAEN_BOOL cvWRITE;
00327 CAEN_BOOL cvLWORD;
00328 CAEN_BOOL cvDTACK;
00329 CAEN_BOOL cvBERR;
00330 CAEN_BOOL cvSYSRES;
00331 CAEN_BOOL cvBR;
00332 CAEN_BOOL cvBG;
00333 } CVDisplay;
00334
00335 #endif // __CAENVMETYPES_H