From a914cae28139ba4c61ba0aba8aeffbee4499358d Mon Sep 17 00:00:00 2001 From: laforge Date: Mon, 25 Sep 2006 14:50:05 +0000 Subject: use officially assigned usb vendor and product id's git-svn-id: https://svn.openpcd.org:2342/trunk@225 6dc7ffe9-61d6-0310-9af1-9938baff3ed1 --- firmware/include/openpcd.h | 5 +++-- firmware/src/openpcd.h | 3 +++ firmware/src/os/pcd_enumerate.c | 9 ++++----- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/firmware/include/openpcd.h b/firmware/include/openpcd.h index 9e2d45e..cdfb7a7 100644 --- a/firmware/include/openpcd.h +++ b/firmware/include/openpcd.h @@ -86,8 +86,9 @@ enum openpcd_cmd_class { #define OPENPCD_CMD_PIO_IRQ (0x3|OPENPCD_CLS2CMD(OPENPCD_CMD_CLS_USBTEST)) -#define OPENPCD_VENDOR_ID 0x2342 -#define OPENPCD_PRODUCT_ID 0x0001 +#define OPENPCD_VENDOR_ID 0x16c0 +#define OPENPCD_PRODUCT_ID 0x076b +#define OPENPICC_PRODUCT_ID 0x076c #define OPENPCD_OUT_EP 0x01 #define OPENPCD_IN_EP 0x82 #define OPENPCD_IRQ_EP 0x83 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 //#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 { -- cgit v1.2.3