/********************************************************************/ /* 7188XC + X105 source code */ /* */ /* [12/October/2005] by Liam */ /* [18/Dec/2006] by Liam */ /********************************************************************/ /********************************************************************/ /* X105: 8 channels DI/DO (Each channel can be programmed to DI/DO)*/ /********************************************************************/ #ifndef __X105_H #define __X105_H #ifdef __cplusplus extern "C" { #endif int X105_Init(int pin_status); /* Always return 0 */ unsigned X105_GetLibVersion(void); /* Current version is 2.00 (return 0x0200) */ int X105_Read_All_DI(void); /* Return data = 0x0000 ~ 0x00ff Return 1 => Dry contact = open to GND Wet contact = 3.5V ~ 30V Return 0 => Dry contact = close to GND Wet contact = 0V ~ 1V */ int X105_Read_One_DI(int iChannel); /* iChannel = 0 ~ 7 Return 1 => Dry contact = open to GND Wet contact = 3.5V ~ 30V Return 0 => Dry contact = close to GND Wet contact = 0V ~ 1V */ void X105_Write_All_DO(int iOutValue); /* iOutValue: 0x0000 ~ 0x00ff */ int X105_Write_One_DO(int iChannel, int iStatus); /* iChannel = 0 ~ 7 Return 1 => Success Return 0 => Fail */ int X105_Read_All_DO(void); /* Return data = 0x0000 ~ 0x00ff */ int X105_Read_One_DO(int iChannel); /* iChannel = 0 ~ 7 Return 1 => ON Return 0 => OFF */ #define _DI_ 1 #define _DO_ 0 #ifdef __cplusplus } #endif #endif