4 struct rfid_layer2_handle;
5 struct rfid_reader_handle;
9 #include <rfid/rfid_layer2_iso14443a.h>
10 #include <rfid/rfid_layer2_iso14443b.h>
11 #include <rfid/rfid_layer2_iso15693.h>
19 struct rfid_layer2_handle *(*init)(struct rfid_reader_handle *h);
20 int (*open)(struct rfid_layer2_handle *h);
21 int (*transcieve)(struct rfid_layer2_handle *h,
22 enum rfid_frametype frametype,
23 const unsigned char *tx_buf,
24 unsigned int tx_len, unsigned char *rx_buf,
25 unsigned int *rx_len, u_int64_t timeout,
27 int (*close)(struct rfid_layer2_handle *h);
28 int (*fini)(struct rfid_layer2_handle *h);
30 struct rfid_layer2 *next;
33 struct rfid_layer2_handle {
34 struct rfid_reader_handle *rh;
35 unsigned char uid[10]; /* triple size 14443a id is 10 bytes */
38 struct iso14443a_handle iso14443a;
39 struct iso14443b_handle iso14443b;
40 struct iso15693_handle iso15693;
42 struct rfid_layer2 *l2;
47 RFID_LAYER2_ISO14443A,
48 RFID_LAYER2_ISO14443B,
52 struct rfid_layer2_handle *rfid_layer2_init(struct rfid_reader_handle *rh,
54 int rfid_layer2_open(struct rfid_layer2_handle *l2h);
55 int rfid_layer2_transcieve(struct rfid_layer2_handle *l2h,
56 enum rfid_frametype frametype,
57 const unsigned char *tx_buf, unsigned int tx_len,
58 unsigned char *rx_buf, unsigned int *rx_len,
59 u_int64_t timeout, unsigned int flags);
60 int rfid_layer2_close(struct rfid_layer2_handle *l2h);
61 int rfid_layer2_fini(struct rfid_layer2_handle *l2h);