#define WORD int

#define NoError 	0
#define SysNoOpen	1
#define ActiveError	2
#define TimeOut 	3
#define SysOpenError	4
#define CheckError	5
#define BoardError	6
#define SingDiffError	7
#define IrqError	8
#define SampleRateError 9
#define HandshakeError	10

extern short  LD_ShortSub2(short nA, short nB);
extern float  LD_FloatSub2(float fA, float fB);
extern WORD   LD_GetVersion(void);
extern WORD   LD_CheckBoard(WORD wBoard, WORD wBase, WORD wIrq);
extern WORD   LD_ActiveBoard(WORD wBoard);
extern WORD   LD_ReadActive(WORD *wActive, WORD *wBase, WORD *wIrq);

extern WORD   LD_WriteDiMode(WORD wDiMode);
extern WORD   LD_ReadDiMode(WORD *wDiMode);

extern WORD   LD_WriteDo(WORD wDo);
extern WORD   LD_ReadDo(WORD *wDo);

extern WORD   LD_ReadDi(WORD *wDi);
extern WORD   LD_ReadLatchDi(WORD *wDi);
extern WORD   LD_ClearLatchDi(WORD wChannel);

extern WORD   LD_SetChannelGain(WORD wChannel, WORD wGain);
extern WORD   LD_ReadChannelGain(WORD *wChannel, WORD *wGain);

extern WORD   LD_SetPacerTimer(WORD wCount);
extern WORD   LD_ReadPacerTimer(WORD *wCount);

extern WORD   LD_SetLedConfiguration(WORD wBase, WORD wDelta);
extern WORD   LD_ReadLedConfiguration(WORD *wBase, WORD *wDelta);

extern WORD   LD_WriteDaBias(WORD wDa);
extern WORD   LD_ReadDaBias(WORD *wDa);

extern WORD   LD_ReadAd(WORD *wAd);
extern WORD   LD_StartAdsPacer(WORD wCount);
extern WORD   LD_ReadFifo(WORD *wFifoData);
extern WORD   LD_ClearFifo();

extern WORD   LD_ReadSystemStatus(WORD *wStatus);
