diff options
author | (no author) <(no author)@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2006-08-23 20:25:06 +0000 |
---|---|---|
committer | (no author) <(no author)@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2006-08-23 20:25:06 +0000 |
commit | 500927717f4e7a950a53bbfe63657e2d9fea556a (patch) | |
tree | c9b86aad6e7df3cfc382ec0d2b9b3397ad256b2a | |
parent | 2c41370aeb9aa7a15d0dd12374a35240347f39a7 (diff) |
- fix OPENPCD_REG_MAX typo
- add USBTEST class
git-svn-id: https://svn.openpcd.org:2342/trunk@125 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
-rw-r--r-- | openpcd/firmware/include/openpcd.h | 18 |
1 files changed, 17 insertions, 1 deletions
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 |