Update Sl2s2002.c

option bit also for sending security state in single read
This commit is contained in:
Thorsten
2018-10-28 23:34:55 +01:00
committed by GitHub
parent 94a1f460eb
commit 9636574341
+14 -6
View File
@@ -78,12 +78,20 @@ uint16_t Sl2s2002AppProcess(uint8_t* FrameBuf, uint16_t FrameBytes)
ResponseByteCount = 15;
}
} else if (Command == ISO15693_CMD_READ_SINGLE) {
if (ISO15693Addressed(FrameBuf, Uid)) {
uint8_t PageAddress = FrameBuf[10];
FrameBuf[0] = 0; /* Flags */
MemoryReadBlock(FrameBuf + 1, PageAddress * BYTES_PER_PAGE, BYTES_PER_PAGE);
ResponseByteCount = 5;
}
if (ISO15693Addressed(FrameBuf, Uid)) {
uint8_t PageAddress = FrameBuf[10];
if (FrameBuf[0] & ISO15693_REQ_FLAG_OPTION)
{
FrameBuf[0] = 0x00; /* Flags */
FrameBuf[1] = 0x00; /* security dummy to 0 */
MemoryReadBlock(FrameBuf + 2, PageAddress * BYTES_PER_PAGE, BYTES_PER_PAGE);
ResponseByteCount = 6;
} else {
FrameBuf[0] = 0x00; /* Flags */
MemoryReadBlock(FrameBuf + 1, PageAddress * BYTES_PER_PAGE, BYTES_PER_PAGE);
ResponseByteCount = 5;
}
}
} else if (Command == ISO15693_CMD_READ_MULTIPLE) {
if (ISO15693Addressed(FrameBuf, Uid)) {
uint16_t PageAddress = FrameBuf[10];