4 struct rfid_layer2_handle;
5 struct rfid_reader_handle;
7 #include <rfid/rfid_layer2_iso14443a.h>
8 #include <rfid/rfid_layer2_iso14443b.h>
9 #include <rfid/rfid_layer2_iso15693.h>
17 struct rfid_layer2_handle *(*init)(struct rfid_reader_handle *h);
18 int (*open)(struct rfid_layer2_handle *h);
19 int (*transcieve)(struct rfid_layer2_handle *h,
20 const unsigned char *tx_buf,
21 unsigned int tx_len, unsigned char *rx_buf,
22 unsigned int *rx_len, unsigned int timeout,
24 int (*close)(struct rfid_layer2_handle *h);
25 int (*fini)(struct rfid_layer2_handle *h);
27 struct rfid_layer2 *next;
30 struct rfid_layer2_handle {
31 struct rfid_reader_handle *rh;
33 struct iso14443a_handle iso14443a;
34 struct iso14443b_handle iso14443b;
35 struct iso15693_handle iso15693;
37 struct rfid_layer2 *l2;
42 RFID_LAYER2_ISO14443A,
43 RFID_LAYER2_ISO14443B,
47 struct rfid_layer2_handle *rfid_layer2_init(struct rfid_reader_handle *rh,
49 int rfid_layer2_open(struct rfid_layer2_handle *l2h);
50 int rfid_layer2_transcieve(struct rfid_layer2_handle *l2h,
51 const unsigned char *tx_buf, unsigned int tx_len,
52 unsigned char *rx_buf, unsigned int *rx_len,
53 unsigned int timeout, unsigned int flags);
54 int rfid_layer2_close(struct rfid_layer2_handle *l2h);
55 int rfid_layer2_fini(struct rfid_layer2_handle *l2h);