1 #ifndef _RFID_PROTOCOL_TCL_H
2 #define _RFID_PROTOCOL_TCL_H
4 enum rfid_proto_tcl_opt {
5 RFID_OPT_P_TCL_ATS = 0x00010001,
6 RFID_OPT_P_TCL_ATS_LEN = 0x00010002,
11 enum tcl_transport_rate {
18 enum tcl_transport_transceive_flags {
19 TCL_TRANSP_F_TX_CRC = 0x01, /* transport adds TX CRC */
20 TCL_TRANSP_F_RX_CRC = 0x02,
24 /* derived from ats */
25 unsigned char *historical_bytes; /* points into ats */
26 unsigned int historical_len;
28 unsigned int fsc; /* max frame size accepted by card */
29 unsigned int fsd; /* max frame size accepted by reader */
30 unsigned int fwt; /* frame waiting time (in usec)*/
31 unsigned char ta; /* divisor information */
32 unsigned char sfgt; /* start-up frame guard time (in usec) */
34 /* otherwise determined */
35 unsigned int cid; /* Card ID */
36 unsigned int nad; /* Node Address */
39 unsigned int state; /* protocol state */
41 unsigned int toggle; /* send toggle with next frame */
44 unsigned char ats[256]; /* ATS cannot be bigger than FSD-2 bytes,
45 according to ISO 14443-4 5.2.2 */
48 enum tcl_handle_flags {
49 TCL_HANDLE_F_NAD_SUPPORTED = 0x0001,
50 TCL_HANDLE_F_CID_SUPPORTED = 0x0002,
51 TCL_HANDLE_F_NAD_USED = 0x0010,
52 TCL_HANDLE_F_CID_USED = 0x0020,
57 TCL_PCB_CID_FOLLOWING = 0x08,
58 TCL_PCB_NAD_FOLLOWING = 0x04,
62 TCL_STATE_NONE = 0x00,
64 TCL_STATE_RATS_SENT, /* waiting for ATS */
65 TCL_STATE_ATS_RCVD, /* ATS received */
66 TCL_STATE_PPS_SENT, /* waiting for PPS response */
67 TCL_STATE_ESTABLISHED, /* xchg transparent data */
68 TCL_STATE_DESELECT_SENT, /* waiting for DESELECT response */
69 TCL_STATE_DESELECTED, /* card deselected or HLTA'd */
72 extern const struct rfid_protocol rfid_protocol_tcl;
74 #endif /* __LIBRFID__ */