4 #include <librfid/rfid_asic.h>
5 #include <librfid/rfid_layer2_iso14443a.h>
7 struct rfid_reader_handle;
12 unsigned int l2_supported;
13 unsigned int proto_supported;
15 int (*transceive)(struct rfid_reader_handle *h,
16 enum rfid_frametype frametype,
17 const unsigned char *tx_buf, unsigned int tx_len,
18 unsigned char *rx_buf, unsigned int *rx_len,
19 u_int64_t timeout, unsigned int flags);
20 struct rfid_reader_handle * (*open)(void *data);
21 void (*close)(struct rfid_reader_handle *h);
23 struct rfid_14443a_reader {
24 int (*init)(struct rfid_reader_handle *h);
25 int (*transceive_sf)(struct rfid_reader_handle *h,
27 struct iso14443a_atqa *atqa);
28 int (*transceive_acf)(struct rfid_reader_handle *h,
29 struct iso14443a_anticol_cmd *cmd,
30 unsigned int *bit_of_col);
31 int (*set_speed)(struct rfid_reader_handle *h,
36 struct rfid_14443b_reader {
37 int (*init)(struct rfid_reader_handle *rh);
40 struct rfid_15693_reader {
41 int (*init)(struct rfid_reader_handle *rh);
43 struct rfid_mifare_classic_reader {
44 int (*setkey)(struct rfid_reader_handle *h, const unsigned char *key);
45 int (*auth)(struct rfid_reader_handle *h, u_int8_t cmd,
46 u_int32_t serno, u_int8_t block);
56 struct rfid_reader_handle {
57 struct rfid_asic_handle *ah;
62 struct rfid_reader *reader;
65 extern struct rfid_reader_handle *
66 rfid_reader_open(void *data, unsigned int id);
68 extern void rfid_reader_close(struct rfid_reader_handle *rh);