设置GPO
此命令有两种格式用于设置gpo和获取gpo状态。不同的读写器类型具有不同的gpo数量。
Command Code |
Bootloader 命令 |
App Firmware 命令 |
0x96 |
否 |
是 |
Set Gpo
Data字段格式
字段 |
字节长度 |
描述 |
Gpo Number and Status pairs |
M*2 |
M 个Gpo编号和状态对,每对是2个字节(第一个字节是GPO编号,第二个字节是状态) |
获取Gpo状态
没有Data字段.
获取gpo状态时,回复中的数据字段格式如下。
Data字段格式
字段 |
字节长度 |
描述 |
Status of Gpo pins |
N |
按数字顺序返回的所有gpo的状态。 |
例子1
设置Gpo
Host to Reader
FF |
04 |
96 |
01 |
01 |
02 |
00 |
2F 68 |
Header |
Data Length |
Command Code |
Output #1 |
Status of Output #1 |
Output #2 |
Status of Output #2 |
CRC |
例子2
获取Gpo状态
Reader to Host
FF |
03 |
96 |
00 00 |
01 |
00 |
01 |
EE 3A |
Header |
Data Length |
Command Code |
Status Code |
Status of Output #1 |
Status of Output #2 |
Status of Output #3 |
CRC |