diff options
author | laforge <laforge@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2006-09-25 14:50:05 +0000 |
---|---|---|
committer | laforge <laforge@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2006-09-25 14:50:05 +0000 |
commit | a914cae28139ba4c61ba0aba8aeffbee4499358d (patch) | |
tree | 3f9521b4e2d6645ac1269c83a70adf511e5ad7b5 /firmware/src | |
parent | c96e8111bfbd495164d3bc252aa8e1f10f90ac11 (diff) |
use officially assigned usb vendor and product id's
git-svn-id: https://svn.openpcd.org:2342/trunk@225 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
Diffstat (limited to 'firmware/src')
-rw-r--r-- | firmware/src/openpcd.h | 3 | ||||
-rw-r--r-- | firmware/src/os/pcd_enumerate.c | 9 |
2 files changed, 7 insertions, 5 deletions
diff --git a/firmware/src/openpcd.h b/firmware/src/openpcd.h index 3099373..9ad7288 100644 --- a/firmware/src/openpcd.h +++ b/firmware/src/openpcd.h @@ -8,6 +8,7 @@ #define MHz *1000 kHz #define MCLK (48 MHz) +#define USB_VENDOR_ID OPENPCD_VENDOR_ID #ifdef OLIMEX #define OPENPCD_PIO_LED2 AT91C_PIO_PA17 @@ -21,12 +22,14 @@ #define OPENPCD_PIO_LED1 AT91C_PIO_PA25 #define OPENPCD_PIO_LED2 AT91C_PIO_PA26 #define PIO_BOOTLDR AT91C_PIO_PA27 +#define USB_PRODUCT_ID OPENPCD_PRODUCT_ID #elif defined(PICC) #define OPENPCD_PIO_UDP_CNX NO_UDP_CNX #define OPENPCD_PIO_UDP_PUP AT91C_PIO_PA22 #define OPENPCD_PIO_LED1 AT91C_PIO_PA25 #define OPENPCD_PIO_LED2 AT91C_PIO_PA12 #define PIO_BOOTLDR AT91C_PIO_PA6 +#define USB_PRODUCT_ID OPENPICC_PRODUCT_ID #else #error "unknown PCB" #endif diff --git a/firmware/src/os/pcd_enumerate.c b/firmware/src/os/pcd_enumerate.c index cef6e75..63fe608 100644 --- a/firmware/src/os/pcd_enumerate.c +++ b/firmware/src/os/pcd_enumerate.c @@ -41,7 +41,7 @@ #include <os/dbgu.h> //#define DEBUG_UDP_IRQ -#define DEBUG_UDP_IRQ_IN +//#define DEBUG_UDP_IRQ_IN //#define DEBUG_UDP_IRQ_OUT #define DEBUG_UDP_EP0 @@ -86,8 +86,8 @@ const struct usb_device_descriptor dev_descriptor = { .bDeviceSubClass = 0xff, .bDeviceProtocol = 0xff, .bMaxPacketSize0 = 0x08, - .idVendor = OPENPCD_VENDOR_ID, - .idProduct = OPENPCD_PRODUCT_ID, + .idVendor = USB_VENDOR_ID, + .idProduct = USB_PRODUCT_ID, .bcdDevice = 0x0000, .iManufacturer = 0x00, .iProduct = 0x00, @@ -223,14 +223,12 @@ static int __udp_refill_ep(int ep) /* If we're not configured by the host yet, there is no point * in trying to send data to it... */ if (!upcd.cur_config) { - DEBUGPCR("-ENXIO"); return -ENXIO; } /* If there are already two packets in transit, the DPR of * the SAM7 UDC doesn't have space for more data */ if (atomic_read(&upcd.ep[ep].pkts_in_transit) == 2) { - DEBUGPCR("-EBUSY"); return -EBUSY; } @@ -275,6 +273,7 @@ static int __udp_refill_ep(int ep) * - after last packet of transfer % AT91C_EP_OUT_SIZE != 0 */ DEBUGII("RCTX(ep=%u)_tx_done ", ep); + DEBUGP("RCTX(ep=%u,ctx=%u)_tx_done ", ep, req_ctx_num(rctx)); upcd.ep[ep].incomplete.rctx = NULL; req_ctx_put(rctx); } else { |