nfc test on MQX4.1
[nfc-test.git] / iso14443_typeA.h
blobeba7469bfaf833ff1e4e6070d8e1024880dc513f
2 #ifndef TYPEA_H
3 #define TYPEA_H
5 #include "common.h"
7 #define PICC_REQA 0x26 // request idle
8 #define PICC_WUPA 0x52 // request all
10 #define PICC_SELVL1 0x93 // select1
11 #define PICC_SELVL2 0x95 // select2
12 #define PICC_SELVL3 0x97 // select3
14 #define PICC_HALT 0x50 // halt
16 //SAK
17 #define SAK_TYPEA_TCL 0x20
18 #define SAK_MIFARE_1K 0x08
19 #define SAK_MIFARE_4K 0x18
20 #define SAK_MIFARE_ULTRALIGHT 0x00
21 #define SAK_MIFARE_MINI 0x09
22 #define SAK_SLE66R35 0x88
24 extern const uint8_t selectCmd[3];
26 void typeA_halt(struct picc_device *picc);
27 int typeA_cascade_select(struct picc_device *picc, uint8_t selCode, uint8_t *uid);
28 int typeA_request(struct picc_device *picc, uint8_t reqCmd);
29 int typeA_select(struct picc_device *picc);
30 void typeA_polling_tags(struct picc_device *picc);
32 #endif