/*============================================================================= Name: drvPad.h Abs: Function prototypes used by device support for PAD driver. Auth: 16-nov-2005, Dayle Kotturi (dayle): Initial version. -----------------------------------------------------------------------------*/ #include "copyright_SLAC.h" /* SLAC copyright comments */ /*----------------------------------------------------------------------------- Mod: (newest to oldest) xx-xxx-2007, Dayle Kotturi: xxxxxxxxxxxxxxxxxxxxxxxx =============================================================================*/ #ifndef DRV_PAD_H #define DRV_PAD_H #include "padMacros.h" #include LOCAL int padOperationMode = PAD_STARTING; LOCAL int padCalibrationControl = PAD_CAL_IDLE; /* NB: To be called from Cexp> prompt, it doesn't need to be here; To be called from dev*Pad.c, it does */ int padInitialise(void); int padInitialiseIntr(void); int padInitialiseScalarFromFile(int channel, int sample, char* filename); int padReport(int interest); int padGetIntrCount(void); int padGetScanIOCount(void); int padGetNumShortsRead(int channel, int sample); int padGetNumShortsToRead(int channel, int sample); long padGetAverageI(int channel, int sample); long padGetAverageQ(int channel, int sample); unsigned long padGetVarianceI(int channel, int sample); unsigned long padGetVarianceQ(int channel, int sample); long padGetInterceptI(int channel); long padGetInterceptQ(int channel); short padGetX(int channel, int sample); short *padGetSignal(int channel, int sample, int type); int padGetSampleOffset(int channel, int sample); int padSetSampleOffset(int channel, int sample, int offset); int padGetSampleSize(int channel, int sample); int padSetSampleSize(int type, int channel, int sample, int size); int padSetOperationMode(int mode); int padSetCalibrationControl(int calibrationControl); int padEnableIntr(void); int padDisableIntr(void); int padSoftTrigger(void); int padCalibration(void); int padDumpCalDataToFile(void); #ifdef USING_QSPI int padQSPISetMUX(volatile short val); long padQSPIReadData(); #endif /* used by devWaveform */ int padGetIntrCount(); int padInitialiseScalar(); int padGetOverflowQCount(); int padGetOverflowICount(); #ifdef SCANIO int padGetScanIOCount(); IOSCANPVT padGetIoScanPvt(void); /* needed by dev*Pad.c */ #endif /* debug routines used by debug device support. not used in ops */ int padToggleIRQ5(void); void setDiagnosticBit(); void clearDiagnosticBit(); #ifdef DEBUG_BIT /* note that the debug bit uses irq5 */ extern int diagnosticBitType; #define DEBUG_setDiagnosticBitType(n) {if((n)==diagnosticBitType) setDiagnosticBit();} #define DEBUG_clearDiagnosticBitType(n) {if((n)==diagnosticBitType) clearDiagnosticBit();} #else #define DEBUG_setDiagnosticBitType(n) #define DEBUG_clearDiagnosticBitType(n) #endif #define Bit(n) (1<<(n)) #endif