X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/a2101157f7f6ffda8274d907bc103b63f87aebb6..7d2692658b598c449320fbaef6ea9612e214c1fd:/common/usb_cdc.c?ds=sidebyside diff --git a/common/usb_cdc.c b/common/usb_cdc.c index 5111ac1f..9d621777 100644 --- a/common/usb_cdc.c +++ b/common/usb_cdc.c @@ -57,7 +57,7 @@ const char devDescriptor[] = { 0x01,0x00, // Device release number (0001) 0x01, // iManufacturer // 0x01 0x00, // iProduct - 0x00, // SerialNumber + 0xFD, // SerialNumber 0x01 // bNumConfigs }; @@ -72,7 +72,7 @@ const char cfgDescriptor[] = { 0x01, // CbConfigurationValue 0x00, // CiConfiguration 0xC0, // CbmAttributes 0xA0 - 0x00, // CMaxPower + 0xFA, // CMaxPower /* Communication Class Interface Descriptor Requirement */ 0x09, // bLength @@ -82,7 +82,7 @@ const char cfgDescriptor[] = { 0x01, // bNumEndpoints 0x02, // bInterfaceClass 0x02, // bInterfaceSubclass - 0x00, // bInterfaceProtocol + 0x01, // bInterfaceProtocol 0x00, // iInterface /* Header Functional Descriptor */ @@ -96,7 +96,7 @@ const char cfgDescriptor[] = { 0x04, // bFunctionLength 0x24, // bDescriptor Type: CS_INTERFACE 0x02, // bDescriptor Subtype: ACM Func Desc - 0x00, // bmCapabilities + 0x02, // bmCapabilities /* Union Functional Descriptor */ 0x05, // bFunctionLength @@ -177,22 +177,22 @@ const char strDescriptor[] = { // Clear flags in the UDP_CSR register and waits for synchronization #define UDP_CLEAR_EP_FLAGS(endpoint, flags) { \ volatile unsigned int reg; \ - reg = pUdp->UDP_CSR[endpoint]; \ + reg = pUdp->UDP_CSR[(endpoint)]; \ reg |= REG_NO_EFFECT_1_ALL; \ reg &= ~(flags); \ - pUdp->UDP_CSR[endpoint] = reg; \ - while ( (pUdp->UDP_CSR[endpoint] & (flags)) == (flags)); \ -} + pUdp->UDP_CSR[(endpoint)] = reg; \ + while ( (pUdp->UDP_CSR[(endpoint)] & (flags)) == (flags)); \ +} \ // reset flags in the UDP_CSR register and waits for synchronization #define UDP_SET_EP_FLAGS(endpoint, flags) { \ volatile unsigned int reg; \ - reg = pUdp->UDP_CSR[endpoint]; \ + reg = pUdp->UDP_CSR[(endpoint)]; \ reg |= REG_NO_EFFECT_1_ALL; \ reg |= (flags); \ - pUdp->UDP_CSR[endpoint] = reg; \ - while ( ( pUdp->UDP_CSR[endpoint] & (flags)) != (flags)); \ -} + pUdp->UDP_CSR[(endpoint)] = reg; \ + while ( ( pUdp->UDP_CSR[(endpoint)] & (flags)) != (flags)); \ +} \ /* USB standard request code */