User`s manual
http://www.adtechcn.com 51
6.4 adt8840a_read_8bit( )
Name int adt8840a_read_8bit(int dev_num,int ios,int *value)
Definition Keep reading the status of 8 input points
Input parameter
int dev_num: device number
int ios: initial IO number
Output
parameter
int value: the statuses of successive 8 input points, which correspond to 0-7 respectively.
Return value
0: execution OK; 1: execution failure; -1: transmission abnormity; -2: response overtime;
-3: abnormal data received; -4: disabled device interface
Note None
) 7. Interrupt function
7.1
adt8840a_clear_int( )
Name int adt8840a_clear_int(int dev_num,int mode)
Definition Mark for clearing interruption
Input parameter dev_num: device number
Output
parameter
None
Return value 0: execution OK; -1: transmission abnormity; -4: disabled device interface
Note None
7.2
adt8840a_enable_int( )
Name int adt8840a_enable_int(int dev_num)
Definition Enable interrupt service in motion control
Input parameter dev_num: device number
Output
parameter
None
Return value 0: execution OK; -1: transmission abnormity; -4: disabled device interface
Note None
7.3
adt8840a_disable_int( )
Name int adt8840a_disable_int (int dev_num)
Definition Disable interrupt service in motion control
Input parameter dev_num: device number
Output
parameter
None
Return value 0: execution OK; -1: transmission abnormity; -4: disabled device interface
Note None