// pac_i8014W_ReadFIFO_BlockMode add when Ver 1.0.0.9 // pac_i8014W_ReadFIFO_InISR add when Ver 1.0.0.9 #ifdef __cplusplus extern "C" { #endif #ifdef _8014W_EXPORTS #define I8014WAPI __declspec(dllexport) #else #define I8014WAPI __declspec(dllimport) #endif #define NoError 0 #define ID_ERROR -1 #define SLOT_ERROR -2 #define CHANNEL_ERROR -3 #define GAIN_ERROR -4 #define FIFO_EMPTY -5 #define FIFO_LATCHED -6 #define FIFO_OVERFLOW -7 #define TX_NOTREADY -8 #define FIFO_ISR_ERROR -9 #define REG_SLOT_ISR_ERROR -100 #define MAX_FIFO 4096 I8014WAPI short pac_i8014W_Init(int slot); I8014WAPI short pac_i8014W_GetLibVersion(void); I8014WAPI void pac_i8014W_GetLibDate(char libDate[]); I8014WAPI short pac_i8014W_GetFirmwareVer_L1(int slot); I8014WAPI short pac_i8014W_GetFirmwareVer_L2(int slot); I8014WAPI short pac_i8014W_GetSingleEndJumper(int slot); I8014WAPI void pac_i8014W_ReadGainOffset(int slot,short gain,unsigned short* gainValue, short* offsetValue); // for I-8014CW only I8014WAPI void pac_i8014W_Read_mA_GainOffset(int slot,short ch ,unsigned short* GainValue, short* offsetValue); I8014WAPI void pac_i8014W_Calibrate_CH_mA_Hex(int slot, int ch ,short dataFromFIFO, short* calibratedAI); I8014WAPI void pac_i8014W_Calibrate_CH_mA(int slot, int ch ,short dataFromFIFO, float* calibratedAI); // for I-8014 I8014WAPI void pac_i8014W_CalibrateDataHex(int slot, short iGain,short dataFromFIFO, short* calibratedAI); I8014WAPI void pac_i8014W_CalibrateData(int slot, short iGain,short dataFromFIFO, float* calibratedAI); I8014WAPI short pac_i8014W_ReadAIHex(int slot,short ch,short gain, short* hVal); I8014WAPI short pac_i8014W_ReadAI(int slot,short ch,short gain, float* fVal); I8014WAPI void pac_i8014W_ClearFIFO(int slot); I8014WAPI void pac_i8014W_UnLockFIFO(int slot); I8014WAPI void pac_i8014W_ConfigMagicScan(int slot,short chArr[],short gainArr[],short scanChCount,float sampleRate,short scanMode,short triggerSource,short triggerState, float* realSampleRate); I8014WAPI short pac_i8014W_StartMagicScan(int slot); I8014WAPI short pac_i8014W_StopMagicScan(int slot); I8014WAPI short pac_i8014W_ReadFIFO(int slot, short hexData[], short readCount,short* dataCountFromFIFO);// <=== get data from FIFO ,long* dataCnt I8014WAPI short pac_i8014W_ReadFIFO_BlockMode(int slot, short dataBuf[], long readCount ,long* dataCountFromFIFO); I8014WAPI short pac_i8014W_ReadFIFO_InISR(int slot, short hexData[], short triggerLevel,short* dataCountFromFIFO); // API for magic scan isr function #ifdef WIN32 I8014WAPI short pac_i8014W_InstallMagicScanISR(int slot,void(__stdcall *isr)(int slot),short triggerLevel); //<=== give a callback function for interrupt #else I8014WAPI short pac_i8014W_InstallMagicScanISR(int slot,void(*isr)(int slot),short triggerLevel); //<=== give a callback function for interrupt #endif I8014WAPI short pac_i8014W_UnInstallMagicScanISR(int slot); //<=== give a callback function for interrupt I8014WAPI void pac_i8014W_ClearInt(int slot); #ifdef __cplusplus } #endif