1 #ifndef _RFID_PROTOCOL_TCL_H
2 #define _RFID_PROTOCOL_TCL_H
6 enum tcl_transport_rate {
13 enum tcl_transport_transcieve_flags {
14 TCL_TRANSP_F_TX_CRC = 0x01, /* transport adds TX CRC */
15 TCL_TRANSP_F_RX_CRC = 0x02,
19 /* derived from ats */
20 unsigned char *historical_bytes; /* points into ats */
21 unsigned int historical_len;
23 unsigned int fsc; /* max frame size accepted by card */
24 unsigned int fsd; /* max frame size accepted by reader */
25 unsigned int fwt; /* frame waiting time (in usec)*/
26 unsigned char ta; /* divisor information */
27 unsigned char sfgt; /* start-up frame guard time (in usec) */
29 /* otherwise determined */
30 unsigned int cid; /* Card ID */
31 unsigned int nad; /* Node Address */
34 unsigned int state; /* protocol state */
36 unsigned int toggle; /* send toggle with next frame */
42 enum tcl_handle_flags {
43 TCL_HANDLE_F_NAD_SUPPORTED = 0x0001,
44 TCL_HANDLE_F_CID_SUPPORTED = 0x0002,
45 TCL_HANDLE_F_NAD_USED = 0x0010,
46 TCL_HANDLE_F_CID_USED = 0x0020,
51 TCL_PCB_CID_FOLLOWING = 0x08,
52 TCL_PCB_NAD_FOLLOWING = 0x04,
56 TCL_STATE_NONE = 0x00,
58 TCL_STATE_RATS_SENT, /* waiting for ATS */
59 TCL_STATE_ATS_RCVD, /* ATS received */
60 TCL_STATE_PPS_SENT, /* waiting for PPS response */
61 TCL_STATE_ESTABLISHED, /* xchg transparent data */
62 TCL_STATE_DESELECT_SENT, /* waiting for DESELECT response */
63 TCL_STATE_DESELECTED, /* card deselected or HLTA'd */
66 struct rfid_protocol rfid_protocol_tcl;
68 #endif /* __LIBRFID__ */