ACR1281U-C8 – Application Programming Interface
Version 1.00
www.acs.com.hk
Page 18 of 52
3.12. ACR120_ReadUserPort
Reads the state of user port.
High Level API
:
DLLAPI INT16 AC_DECL
ACR120_ReadUserPort( INT16 hReader,
UINT8* pUserPortState);
Parameters
Description
hReader
Handle to the reader returned by AC_Open()
pUserPortState
Contains the port state (only bit 2 and bit 6 are used)
Return Value
INT16
Result code. 0 means success.
Table 13
: ACR120_ReadUserPort Command Description
Low Level Frame Structure:
Command: From PC to Reader (5 bytes)
Command Code
(1 byte)
Command Data Length
(2 bytes)
Instruction Code
(1 byte)
Data Length
(1 byte)
E0h
0002h
14h
00h
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
pUserPortState
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