unit CaenTypeU;

interface
const
  cvV1718 = 0;
  cvV2718 = 1;
  cvA2818 = 2;
  cvA2719 = 3;
  cvA3818 = 4;

  cvD8 = $01;
  cvD16 =$02;
  cvD32 =$04;
  cvD64 =$08;
  cvD16_swapped = $12;
  cvD32_swapped = $14;
  cvD64_swapped = $18;

  cvA16_S = $2d;
  cvA16_U = $29;
  cvA16_LCK = $2c;

  cvA24_S_BLT = $3f;
  cvA24_S_PGM = $3e;
  cvA24_S_DATA = $3d;
  cvA24_S_MBLT = $3c;
  cvA24_U_BLT = $3b;
  cvA24_U_PGM = $3a;
  cvA24_U_DATA = $39;
  cvA24_U_MBLT = $38;
  cvA24_LCK = $32;

  cvA32_S_BLT = $0f;
  cvA32_S_PGM = $0e;
  cvA32_S_DATA = $0d;
  cvA32_S_MBLT = $0c;
  cvA32_U_BLT = $0b;
  cvA32_U_PGM = $0a;
  cvA32_U_DATA = $09;
  cvA32_U_BMLT = $08;
  cvA32_LCK = $05;

  cvCR_CSR = $2f;

  cvSucess = 0;
  cvBusError = -1;
  cvCommError = -2;
  cvGenericError = -3;
  cvInvalidParam = -4;
  cvTimeoutError = -5;

  cvPulserA = 0;
  cvPulserB = 1;

  cvOutput0 = 0;
  cvOutput1 = 1;
  cvOutput2 = 2;
  cvOutput3 = 3;
  cvOutput4 = 4;

  cVinput0 = 0;
  cvInput1 = 1;

  cvManualSw = 0;
  cvINputSrc0 = 1;
  cvInputSrc1 = 2;
  cvCoincidence = 3;
  cvVMESignals = 4;
  cvMiscSignals = 6;

  cvUnit25ns = 0;
  cvUnit1600ns = 1;
  cvUnit410us = 2;
  cvUnit104ms = 3;

  cvActiveHigh = 0;
  cvActiveLow = 1;

  cvDirect = 0;
  cvInverted = 1;

  cvStatusReg = $00;
  cvVMEControlReg = $01;
  cvFwRelReg = $02;
  cvFwDldReg = $03;
  cvFlenaReg = $04;
  cvVMEIREQEnaReg = $6;
  cvInputReg = $08;
  cvOutRegSet = $0a;
  cvInMuxRegSet = $0b;
  cvOutMuxRegSet = $0c;
  cvLedPolRegSet = $0d;
  cvOutRegClear = $10;
  cvInMuxRegClear = $11;
  cvOutMuxRegClear = $12;
  cvLedPolRegClear = $13;
  cvPulserA0 = $16;
  cvPulserA1 = $17;
  cvPUlserB0 = $19;
  cvPulserB1 = $1a;
  cvScalar0 = $1c;
  cvScalar1 = $1d;
  cvDispADL = $20;
  cvDispADH = $21;
  cvDispDTH = $23;
  cvDispC1 = $24;
  cvDispC2 = $25;
  cvLMADL = $28;
  cvLMADH = $29;
  cvLMC = $2c;

  cySYSRES  = $0001;
  cySYSCTRL = $0002;
  cyDTACK   = $0010;
  cyBERR    = $0020;
  cyDIP0    = $0100;
  cyDIP1    = $0200;
  cyDIP2    = $0400;
  cyDIP3    = $0800;
  cyDIP4    = $1000;
  cyUSBTYPE = $8000;

  cvIn0Bit        = $0001;
  cvIn1Bit        = $0002;
  cvCoincBit      = $0004;
  cvPulsAOutBit   = $0008;
  cvPulsBOutBit   = $0010;
  cvScalEndCntBit = $0020;
  cvLocMonBit     = $0040;

  cvPulsAStartBit = $0001;
  cvPulsAResetBit = $0002;
  cvPulsBStartBit = $0004;
  cvPulsBResetBit = $0008;
  cvScalGateBit   = $0010;
  cvScalResetBit  = $0020;
  cvOut0Bit       = $0040;
  cvOut1Bit       = $0080;
  cvOut2Bit       = $0100;
  cvOut3Bit       = $0200;
  cvOut4Bit       = $0400;

  cvPriorized = 0;
  cvRoundRobin = 1;

  cvFair = 0;
  cvDemand = 1;

  cvRWD = 0;
  cvROR = 1;

  cvBR0 = 0;
  cvBR1 = 1;
  cvBR2 = 2;
  cvBF3 = 3;

  cvIRQ1 = $01;
  cvIRQ2 = $02;
  cvIRQ3 = $04;
  cvIRQ4 = $08;
  cvIRQ5 = $10;
  cvIRQ6 = $20;
  cvIRQ7 = $40;

  cvTimeout50us = 0;
  cvTimeout400us = 1;

  type CVDisplay = record
                      cvAddress : longint;
                      cvData    : longint;
                      cvAM      : longint;
                      cvIRQ     : longint;
                      cvDS0, cvDS1, cvAS, cvIACK, cvWRITE,cvLWORD, cvDTACK, cvBERR,cySYSRES, cvBR, cvBG : integer;


  end;





implementation

end.