1 #ifndef _RFID_LAYER2_ISO14443B_H
2 #define _RFID_LAYER2_ISO14443B_H
4 #include <librfid/rfid_layer2.h>
6 enum rfid_iso14443_opt {
7 RFID_OPT_14443B_CID = 0x00010001,
8 RFID_OPT_14443B_FSC = 0x00010002,
9 RFID_OPT_14443B_FSD = 0x00010003,
10 RFID_OPT_14443B_FWT = 0x00010004,
11 RFID_OPT_14443B_TR0 = 0x00010005,
12 RFID_OPT_14443B_TR1 = 0x00010006,
17 struct iso14443b_atqb {
19 unsigned char pupi[4];
20 unsigned char app_data[4];
22 unsigned char bit_rate_capability;
23 unsigned char protocol_type:4,
28 } __attribute__ ((packed)) protocol_info;
29 } __attribute__ ((packed));
31 struct iso14443b_attrib_hdr {
33 unsigned char identifier[4];
40 } __attribute__ ((packed)) param1;
45 } __attribute__ ((packed)) param2;
47 unsigned char protocol_type:4,
49 } __attribute__ ((packed)) param3;
53 } __attribute__ ((packed)) param4;
54 } __attribute__ ((packed));
56 struct iso14443b_handle {
57 unsigned int tcl_capable; /* do we support T=CL */
59 unsigned int cid; /* Card ID */
61 unsigned int fsc; /* max. frame size card */
62 unsigned int fsd; /* max. frame size reader */
64 unsigned int fwt; /* frame waiting time (in usec) */
66 unsigned int mbl; /* maximum buffer length */
68 unsigned int tr0; /* pcd-eof to picc-subcarrier-on */
69 unsigned int tr1; /* picc-subcarrier-on to picc-sof */
76 ISO14443B_CID_SUPPORTED = 0x01,
77 ISO14443B_NAD_SUPPORTED = 0x02,
81 ISO14443B_STATE_ERROR,
83 ISO14443B_STATE_REQB_SENT,
84 ISO14443B_STATE_ATQB_RCVD,
85 ISO14443B_STATE_ATTRIB_SENT,
86 ISO14443B_STATE_SELECTED,
87 ISO14443B_STATE_HLTB_SENT,
88 ISO14443B_STATE_HALTED,
91 #include <librfid/rfid_layer2.h>
92 extern const struct rfid_layer2 rfid_layer2_iso14443b;
94 #endif /* __LIBRFID__ */