ACR1281U-C8 – Application Programming Interface
Version 1.00
www.acs.com.hk
Page 19 of 52
3.13. ACR120_WriteUserPort
Reads the state of user port.
High Level API
:
DLLAPI INT16 AC_DECL
ACR120_WriteUserPort( INT16 hReader,
UINT8 UserPortState);
Parameters
Description
hReader
Handle to the reader returned by AC_Open()
pUserPortState
Contains the port state to write (only bit 2 and bit 6
are used)
Return Value
INT16
Result code. 0 means success.
Table 14
: ACR120_WriteUserPort Command Description
Low Level Frame Structure:
Command: From PC to Reader (6 bytes)
Command Code
(1 byte)
Command Data Length
(1 bytes)
Instruction Code
(1 byte)
Data Length
(1 byte)
Data
(1 byte)
E0h
03h
15h
01h
UserPortState
Response: From Reader to PC (6 bytes) << Success or Fail >>
Response Code
(1 byte)
Response Status
(2 bytes)
Response Data Length
(2 bytes)
Response Data
(1 byte)
E1h
INT16
0001h
UserPortStateStored
Note:
The Response Data (UserPortStateStored) is used for comparison only.
UserPortState:
Bit 0-1: Not Used
Bit 2: Buzzer (0 = OFF; 1 = ON)
Bit 3-5: Not Used
Bit 6: LED (0 = OFF; 1 = ON)
Bit 7: Not Used