diff options
author | laforge <laforge@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2006-10-01 21:44:06 +0000 |
---|---|---|
committer | laforge <laforge@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2006-10-01 21:44:06 +0000 |
commit | f1cae2aa9e420242134fb0df3ff06f6605bdffab (patch) | |
tree | 386a5efa0db92879f98f7e9526c178d1ed80a18d /firmware/src/os/usbcmd_generic.c | |
parent | 7a651e94c5fc5fa38da05e68a776d396e11e534d (diff) |
- add command to read rc632 serial number via USB
git-svn-id: https://svn.openpcd.org:2342/trunk@250 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
Diffstat (limited to 'firmware/src/os/usbcmd_generic.c')
-rw-r--r-- | firmware/src/os/usbcmd_generic.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/firmware/src/os/usbcmd_generic.c b/firmware/src/os/usbcmd_generic.c index 9dec14e..386692b 100644 --- a/firmware/src/os/usbcmd_generic.c +++ b/firmware/src/os/usbcmd_generic.c @@ -31,6 +31,17 @@ static int gen_usb_rx(struct req_ctx *rctx) DEBUGP("SET LED(%u,%u) ", poh->reg, poh->val); led_switch(poh->reg, poh->val); break; + case OPENPCD_CMD_GET_SERIAL: + DEBUGP("GET SERIAL "); + poh->flags |= OPENPCD_FLAG_RESPOND; +#ifdef PCD + rctx->tot_len += 4; + rc632_get_serial(NULL, (u_int32_t *)poh->data); +#else + /* FIXME: where to get serial in PICC case */ + return USB_ERR(USB_ERR_CMD_NOT_IMPL); +#endif + break; default: DEBUGP("UNKNOWN "); return USB_ERR(USB_ERR_CMD_UNKNOWN); |