1 #ifndef _OPENPCD_PROTO_H
2 #define _OPENPCD_PROTO_H
4 /* This header file describes the USB protocol of the OpenPCD RFID reader */
9 u_int8_t cmd; /* command */
11 u_int8_t reg; /* register */
12 u_int8_t val; /* value (in case of write *) */
16 } __attribute__((packed));
18 #define OPENPCD_REG_MAX 0x3f
20 #define OPENPCD_CMD_WRITE_REG 0x01
21 #define OPENPCD_CMD_WRITE_FIFO 0x02
22 #define OPENPCD_CMD_WRITE_VFIFO 0x03
23 #define OPENPCD_CMD_REG_BITS_CLEAR 0x04
24 #define OPENPCD_CMD_REG_BITS_SET 0x05
26 #define OPENPCD_CMD_READ_REG 0x11
27 #define OPENPCD_CMD_READ_FIFO 0x12
28 #define OPENPCD_CMD_READ_VFIFO 0x13
30 #define OPENPCD_CMD_SET_LED 0x21
32 #define OPENPCD_CMD_IRQ 0x40 /* IRQ reported by RC632 */
34 #define OPENPCD_VENDOR_ID 0x2342
35 #define OPENPCD_PRODUCT_ID 0x0001
36 #define OPENPCD_OUT_EP 0x01
37 #define OPENPCD_IN_EP 0x82
38 #define OPENPCD_IRQ_EP 0x83
40 extern struct rfid_reader rfid_reader_openpcd;