4 #include <rfid/rfid_asic.h>
5 #include <rfid/rfid_layer2_iso14443a.h>
7 struct rfid_reader_handle;
12 int (*transcieve)(struct rfid_reader_handle *h,
13 enum rfid_frametype frametype,
14 const unsigned char *tx_buf, unsigned int tx_len,
15 unsigned char *rx_buf, unsigned int *rx_len,
16 u_int64_t timeout, unsigned int flags);
17 struct rfid_reader_handle * (*open)(void *data);
18 void (*close)(struct rfid_reader_handle *h);
20 struct rfid_14443a_reader {
21 int (*init)(struct rfid_reader_handle *h);
22 int (*transcieve_sf)(struct rfid_reader_handle *h,
24 struct iso14443a_atqa *atqa);
25 int (*transcieve_acf)(struct rfid_reader_handle *h,
26 struct iso14443a_anticol_cmd *cmd,
27 unsigned int *bit_of_col);
28 int (*set_speed)(struct rfid_reader_handle *h,
32 struct rfid_14443b_reader {
33 int (*init)(struct rfid_reader_handle *rh);
36 struct rfid_15693_reader {
37 int (*init)(struct rfid_reader_handle *rh);
39 struct rfid_mifare_classic_reader {
40 int (*setkey)(struct rfid_reader_handle *h, unsigned char *key);
41 int (*auth)(struct rfid_reader_handle *h, u_int8_t cmd,
42 u_int32_t serno, u_int8_t block);
44 struct rfid_reader *next;
52 struct rfid_reader_handle {
53 struct rfid_asic_handle *ah;
58 struct rfid_reader *reader;
62 extern struct rfid_reader_handle *
63 rfid_reader_open(void *data, unsigned int id);
65 extern void rfid_reader_close(struct rfid_reader_handle *rh);