1 #ifndef _RFID_ASIC_RC632_H
2 #define _RFID_ASIC_RC632_H
4 struct rfid_asic_transport_handle;
6 #include <librfid/rfid.h>
7 #include <librfid/rfid_asic.h>
9 struct rfid_asic_rc632_transport {
11 int (*reg_write)(struct rfid_asic_transport_handle *rath,
14 int (*reg_read)(struct rfid_asic_transport_handle *rath,
17 int (*fifo_write)(struct rfid_asic_transport_handle *rath,
21 int (*fifo_read)(struct rfid_asic_transport_handle *rath,
27 struct rfid_asic_handle;
29 struct iso14443a_atqa;
30 struct iso14443a_anticol_cmd;
32 struct rfid_asic_rc632 {
34 int (*power_up)(struct rfid_asic_handle *h);
35 int (*power_down)(struct rfid_asic_handle *h);
36 int (*rf_power)(struct rfid_asic_handle *h, int on);
37 int (*transceive)(struct rfid_asic_handle *h,
39 const u_int8_t *tx_buf,
46 int (*init)(struct rfid_asic_handle *h);
47 int (*transceive_sf)(struct rfid_asic_handle *h,
49 struct iso14443a_atqa *atqa);
50 int (*transceive_acf)(struct rfid_asic_handle *h,
51 struct iso14443a_anticol_cmd *cmd,
52 unsigned int *bit_of_col);
53 int (*set_speed)(struct rfid_asic_handle *h,
58 int (*init)(struct rfid_asic_handle *h);
61 int (*init)(struct rfid_asic_handle *h);
64 int (*setkey)(struct rfid_asic_handle *h,
65 const unsigned char *key);
66 int (*auth)(struct rfid_asic_handle *h, u_int8_t cmd,
67 u_int32_t serno, u_int8_t block);
72 struct rc632_transport_handle {
75 /* A handle to a specific RC632 chip */
76 struct rfid_asic_rc632_handle {
77 struct rc632_transport_handle th;
80 struct rfid_asic_rc632_impl_proto {
81 u_int8_t mod_conductance;
82 u_int8_t cw_conductance;
87 struct rfid_asic_rc632_impl {
88 u_int32_t mru; /* maximum receive unit (PICC->PCD) */
89 u_int32_t mtu; /* maximum transmit unit (PCD->PICC) */
90 //struct rfid_asic_rc632_impl_proto proto[NUM_RFID_PROTOCOLS];
93 extern struct rfid_asic_handle * rc632_open(struct rfid_asic_transport_handle *th);
94 extern void rc632_close(struct rfid_asic_handle *h);