4 #include <librfid/rfid_asic.h>
5 #include <librfid/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,
33 struct rfid_14443b_reader {
34 int (*init)(struct rfid_reader_handle *rh);
37 struct rfid_15693_reader {
38 int (*init)(struct rfid_reader_handle *rh);
40 struct rfid_mifare_classic_reader {
41 int (*setkey)(struct rfid_reader_handle *h, unsigned char *key);
42 int (*auth)(struct rfid_reader_handle *h, u_int8_t cmd,
43 u_int32_t serno, u_int8_t block);
45 struct rfid_reader *next;
54 struct rfid_reader_handle {
55 struct rfid_asic_handle *ah;
60 struct rfid_reader *reader;
64 extern struct rfid_reader_handle *
65 rfid_reader_open(void *data, unsigned int id);
67 extern void rfid_reader_close(struct rfid_reader_handle *rh);