/* head file for adcard.h service dll for AD Card. Copyright(C) RBH, Sept.2, 1998 */ //AD Result Struct typedef struct structADResult { WORD SeqNo; WORD ADValue[1]; } ADCard_Result; //API return value #define ADCard_Success 1 #define ADCard_Error 0 #define NumNotify 4 //exported API #ifdef __cplusplus extern "C" { #endif //Initial(): Return ADCard_Error or ADCard_Success int __stdcall Initial(WORD IOBase, WORD IRQNum, DWORD PhysAddr,WORD DMAChn); //StartIntr(): Retur 0 or BuffSize DWORD __stdcall StartIntr(WORD NumBuf, DWORD NumSamp,\ WORD BegChn, WORD NumChn, \ DWORD FrqSamp, DWORD FrqFilter,\ WORD AmpGain); //StartSnapshot(): Retur ADCard_Error or ADCard_Success DWORD __stdcall StartSnapshot(WORD NumBuf, DWORD NumSamp,\ WORD BegChn, WORD NumChn,\ DWORD FrqSamp, DWORD FrqFilter,\ WORD AmpGain,DWORD NotifyLength); //RegisterNotify(): Return ADCard_Error or ADCard_Success // NotifyNo: 0 -- 3 int __stdcall RegisterNotify(UINT NotifyNo, HANDLE hWnd,UINT uMsg,\ UINT wParam, LONG lParam); //StopStr(): Return ADCard_Error or ADCard_Success int __stdcall StopIntr(void); //QueryBuf(): Return Num of buff exist WORD __stdcall QueryBuf(void); //ADResult(): Return ADCard_Error or ADCard_Success int __stdcall ADResult(ADCard_Result * Buf); //ADResultRecent(): Return ADCard_Error or ADCard_Success int __stdcall ADResultRecent(ADCard_Result * Buf); //GetSnapshot(): Return ADCard_Error or ADCard_Success int __stdcall GetSnapshot(ADCard_Result * Buf, int SampPerChn, DWORD * SampPtr); //ConfigInfo(): return ADCard config info void __stdcall ConfigInfo(char * ADCard_Name,\ int * MaxChn,\ int * LowFreq,\ int * HighFreq,\ int * MinSampNum,\ float * VZero,\ float * VMax,\ int * MaxBinChn); //return actual sample frequency for each channel float __stdcall ChannelFrq(int NumChn,long FrqSamp); //card dependent IOCtl interface int __stdcall IOCtl(int InSize,char * InBuff,int OutSize,char * OutBuff); //IO tools function void __stdcall outportb(WORD port, WORD value); WORD __stdcall inportb(WORD port); void __stdcall outport(WORD port, WORD value); WORD __stdcall inport(WORD port); void __stdcall outportdw(WORD port, DWORD value); DWORD __stdcall inportdw(WORD port); #ifdef __cplusplus } #endif