8 #ifndef ISO14443_3AINLINE_H_
9 #define ISO14443_3AINLINE_H_
13 bool ISO14443ASelect(
void* Buffer, uint16_t* BitCount, uint8_t* UidCL, uint8_t SAKValue)
15 uint8_t* DataPtr = (uint8_t*) Buffer;
16 uint8_t NVB = DataPtr[1];
21 case ISO14443A_NVB_AC_START:
24 DataPtr[0] = UidCL[0];
25 DataPtr[1] = UidCL[1];
26 DataPtr[2] = UidCL[2];
27 DataPtr[3] = UidCL[3];
28 DataPtr[4] = ISO14443A_CALC_BCC(DataPtr);
30 *BitCount = ISO14443A_CL_FRAME_SIZE;
34 case ISO14443A_NVB_AC_END:
37 if ( (DataPtr[2] == UidCL[0]) &&
38 (DataPtr[3] == UidCL[1]) &&
39 (DataPtr[4] == UidCL[2]) &&
40 (DataPtr[5] == UidCL[3]) ) {
42 DataPtr[0] = SAKValue;
43 ISO14443AAppendCRCA(Buffer, 1);
45 *BitCount = ISO14443A_SAK_FRAME_SIZE;
60 bool ISO14443AWakeUp(
void* Buffer, uint16_t* BitCount, uint16_t ATQAValue)
62 uint8_t* DataPtr = (uint8_t*) Buffer;
64 if ( (DataPtr[0] == ISO14443A_CMD_REQA) || (DataPtr[0] == ISO14443A_CMD_WUPA) ){
65 DataPtr[0] = (ATQAValue >> 0) & 0x00FF;
66 DataPtr[1] = (ATQAValue >> 8) & 0x00FF;
68 *BitCount = ISO14443A_ATQA_FRAME_SIZE;