1 #ifndef _RFID_ASIC_RC632_H
2 #define _RFID_ASIC_RC632_H
4 struct rfid_asic_transport_handle;
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 (*turn_on_rf)(struct rfid_asic_handle *h);
37 int (*turn_off_rf)(struct rfid_asic_handle *h);
38 int (*transceive)(struct rfid_asic_handle *h,
40 const u_int8_t *tx_buf,
47 int (*init)(struct rfid_asic_handle *h);
48 int (*transceive_sf)(struct rfid_asic_handle *h,
50 struct iso14443a_atqa *atqa);
51 int (*transceive_acf)(struct rfid_asic_handle *h,
52 struct iso14443a_anticol_cmd *cmd,
53 unsigned int *bit_of_col);
54 int (*set_speed)(struct rfid_asic_handle *h,
59 int (*init)(struct rfid_asic_handle *h);
62 int (*init)(struct rfid_asic_handle *h);
65 int (*setkey)(struct rfid_asic_handle *h,
66 const unsigned char *key);
67 int (*auth)(struct rfid_asic_handle *h, u_int8_t cmd,
68 u_int32_t serno, u_int8_t block);
73 struct rc632_transport_handle {
76 /* A handle to a specific RC632 chip */
77 struct rfid_asic_rc632_handle {
78 struct rc632_transport_handle th;
81 struct rfid_asic_rc632_impl_proto {
82 u_int8_t mod_conductance;
83 u_int8_t cw_conductance;
88 struct rfid_asic_rc632_impl {
89 u_int32_t mru; /* maximum receive unit (PICC->PCD) */
90 u_int32_t mtu; /* maximum transmit unit (PCD->PICC) */
91 //struct rfid_asic_rc632_impl_proto proto[NUM_RFID_PROTOCOLS];
94 extern struct rfid_asic_handle * rc632_open(struct rfid_asic_transport_handle *th);
95 extern void rc632_close(struct rfid_asic_handle *h);