User`s manual
http://www.adtechcn.com 50
) 6. Input and output of switch value
6.1
adt8840a_read_bit( )
Name int adt8840a_read_bit(int dev_num,int number,int *value)
Definition Read single input point
Input parameter
dev_num: device number
number: input point number
Output
parameter
Value: 0: low; 1: high
Return value
0: execution OK; 1: execution failure; -1: transmission abnormity; -2: response overtime;
-3: abnormal data received; -4: disabled device interface
Note
For the scope of input points and the related functions, please refer to the corresponding
operating instructions of controller’s hardware.
.
6.2
6.2 adt8840a_write_bit( )
Name
int
adt8840a_
write_bit(int dev_num , int number, int value)
Definition Output single point (executed in line in software buffer)
Input parameter
dev_num: device number
number: output point number
Value: 0: low; 1: high
Output
parameter
None
Return value 0: execution OK; -1: transmission abnormity; 4: disabled device interface
Note
For the scope of output points and the related functions, please refer to the corresponding
operating instructions of controller’s hardware.
6.3 adt8840a_sudden_write_bit
Name
int
adt8840a_sudden_
write_bit(int dev_num , int number, int value)
Definition Output single point (executed immediately)
Input parameter
dev_num: device number
number: output point number
Value: 0: low; 1: high
Output
parameter
None
Return value 0: execution OK; -1: transmission abnormity; 4: disabled device interface
Note
For the scope of output points and the related functions, please refer to the corresponding
operating instructions of control card’s hardware.