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 #ifndef RFID_BIG_ENDIAN_BITFIELD
24 unsigned char protocol_type:4,
30 unsigned char max_frame_size:4,
36 } __attribute__ ((packed)) protocol_info;
37 } __attribute__ ((packed));
39 struct iso14443b_attrib_hdr {
41 unsigned char identifier[4];
43 #ifndef RFID_BIG_ENDIAN_BITFIELD
50 unsigned char min_tr0:2,
56 } __attribute__ ((packed)) param1;
58 #ifndef RFID_BIG_ENDIAN_BITFIELD
63 unsigned char spd_in:2,
67 } __attribute__ ((packed)) param2;
69 #ifndef RFID_BIG_ENDIAN_BITFIELD
70 unsigned char protocol_type:4,
76 } __attribute__ ((packed)) param3;
78 #ifndef RFID_BIG_ENDIAN_BITFIELD
85 } __attribute__ ((packed)) param4;
86 } __attribute__ ((packed));
88 struct iso14443b_handle {
89 unsigned int tcl_capable; /* do we support T=CL */
91 unsigned int cid; /* Card ID */
93 unsigned int fsc; /* max. frame size card */
94 unsigned int fsd; /* max. frame size reader */
96 unsigned int fwt; /* frame waiting time (in usec) */
98 unsigned int mbl; /* maximum buffer length */
100 unsigned int tr0; /* pcd-eof to picc-subcarrier-on */
101 unsigned int tr1; /* picc-subcarrier-on to picc-sof */
108 ISO14443B_CID_SUPPORTED = 0x01,
109 ISO14443B_NAD_SUPPORTED = 0x02,
113 ISO14443B_STATE_ERROR,
114 ISO14443B_STATE_NONE,
115 ISO14443B_STATE_REQB_SENT,
116 ISO14443B_STATE_ATQB_RCVD,
117 ISO14443B_STATE_ATTRIB_SENT,
118 ISO14443B_STATE_SELECTED,
119 ISO14443B_STATE_HLTB_SENT,
120 ISO14443B_STATE_HALTED,
123 #include <librfid/rfid_layer2.h>
124 extern const struct rfid_layer2 rfid_layer2_iso14443b;
126 #endif /* __LIBRFID__ */