From 500927717f4e7a950a53bbfe63657e2d9fea556a Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> Date: Wed, 23 Aug 2006 20:25:06 +0000 Subject: - fix OPENPCD_REG_MAX typo - add USBTEST class git-svn-id: https://svn.openpcd.org:2342/trunk@125 6dc7ffe9-61d6-0310-9af1-9938baff3ed1 --- openpcd/firmware/include/openpcd.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/openpcd/firmware/include/openpcd.h b/openpcd/firmware/include/openpcd.h index 2dbae5f..68adddc 100644 --- a/openpcd/firmware/include/openpcd.h +++ b/openpcd/firmware/include/openpcd.h @@ -13,14 +13,21 @@ struct openpcd_hdr { u_int8_t data[0]; } __attribute__ ((packed)); +#define OPENPC_FLAG_RESPOND 0x01 /* Response requested */ + enum openpcd_cmd_class { + /* PCD (reader) side */ OPENPCD_CMD_CLS_RC632 = 0x1, OPENPCD_CMD_CLS_LED = 0x2, OPENPCD_CMD_CLS_SSC = 0x3, OPENPCD_CMD_CLS_PWM = 0x4, + /* PICC (transponder) side */ + OPENPCD_CMD_CLS_PICC = 0x5, + + OPENPCD_CMD_CLS_USBTEST = 0xf, }; -#define OPENPC_REG_MAX 0x3f +#define OPENPCD_REG_MAX 0x3f #define OPENPCD_CMD_CLS(x) (x >> 4) #define OPENPCD_CMD(x) (x & 0xf) @@ -53,6 +60,15 @@ enum openpcd_cmd_class { #define OPENPCD_CMD_PWM_FREQ_SET (0x4|OPENPCD_CLS2CMD(OPENPCD_CMD_CLS_PWM)) #define OPENPCD_CMD_PWM_FREQ_GET (0x5|OPENPCD_CLS2CMD(OPENPCD_CMD_CLS_PWM)) +/* CMD_CLS_PICC */ +#define OPENPCD_CMD_PICC_REG_WRITE (0x1|OPENPCD_CLS2CMD(OPENPCD_CMD_CLS_PICC)) +#define OPENPCD_CMD_PICC_REG_READ (0x2|OPENPCD_CLS2CMD(OPENPCD_CMD_CLS_PICC)) + +/* CMD_CLS_USBTEST */ +#define OPENPCD_CMD_USBTEST_IN (0x1|OPENPCD_CLS2CMD(OPENPCD_CMD_CLS_USBTEST)) +#define OPENPCD_CMD_USBTEST_OUT (0x2|OPENPCD_CLS2CMD(OPENPCD_CMD_CLS_USBTEST)) + + #define OPENPCD_VENDOR_ID 0x2342 #define OPENPCD_PRODUCT_ID 0x0001 #define OPENPCD_OUT_EP 0x01 -- cgit v1.2.3