]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - common/usb_cdc.c
FIX: lf hitag : Mea culpa, simulation should not have reader_field on. thanks to...
[proxmark3-svn] / common / usb_cdc.c
index 5111ac1fe84cbc7a71bf38afcab48394dd22ed9a..9d621777fe805dc0a290cf87c442874417ea0d9c 100644 (file)
@@ -57,7 +57,7 @@ const char devDescriptor[] = {
        0x01,0x00, // Device release number (0001)\r
        0x01,      // iManufacturer    // 0x01\r
        0x00,      // iProduct\r
-       0x00,      // SerialNumber\r
+       0xFD,      // SerialNumber\r
        0x01       // bNumConfigs\r
 };\r
 \r
@@ -72,7 +72,7 @@ const char cfgDescriptor[] = {
        0x01,   // CbConfigurationValue\r
        0x00,   // CiConfiguration\r
        0xC0,   // CbmAttributes 0xA0\r
-       0x00,   // CMaxPower\r
+       0xFA,   // CMaxPower\r
 \r
        /* Communication Class Interface Descriptor Requirement */\r
        0x09, // bLength\r
@@ -82,7 +82,7 @@ const char cfgDescriptor[] = {
        0x01, // bNumEndpoints\r
        0x02, // bInterfaceClass\r
        0x02, // bInterfaceSubclass\r
-       0x00, // bInterfaceProtocol\r
+       0x01, // bInterfaceProtocol\r
        0x00, // iInterface\r
 \r
        /* Header Functional Descriptor */\r
@@ -96,7 +96,7 @@ const char cfgDescriptor[] = {
        0x04, // bFunctionLength\r
        0x24, // bDescriptor Type: CS_INTERFACE\r
        0x02, // bDescriptor Subtype: ACM Func Desc\r
-       0x00, // bmCapabilities\r
+       0x02, // bmCapabilities\r
 \r
        /* Union Functional Descriptor */\r
        0x05, // bFunctionLength\r
@@ -177,22 +177,22 @@ const char strDescriptor[] = {
 // Clear flags in the UDP_CSR register and waits for synchronization\r
 #define UDP_CLEAR_EP_FLAGS(endpoint, flags) { \\r
        volatile unsigned int reg; \\r
-       reg = pUdp->UDP_CSR[endpoint]; \\r
+       reg = pUdp->UDP_CSR[(endpoint)]; \\r
        reg |= REG_NO_EFFECT_1_ALL; \\r
        reg &= ~(flags); \\r
-       pUdp->UDP_CSR[endpoint] = reg; \\r
-       while ( (pUdp->UDP_CSR[endpoint] & (flags)) == (flags)); \\r
-}\r
+       pUdp->UDP_CSR[(endpoint)] = reg; \\r
+       while ( (pUdp->UDP_CSR[(endpoint)] & (flags)) == (flags)); \\r
+} \\r
 \r
 // reset flags in the UDP_CSR register and waits for synchronization\r
 #define UDP_SET_EP_FLAGS(endpoint, flags) { \\r
        volatile unsigned int reg; \\r
-       reg = pUdp->UDP_CSR[endpoint]; \\r
+       reg = pUdp->UDP_CSR[(endpoint)]; \\r
        reg |= REG_NO_EFFECT_1_ALL; \\r
        reg |= (flags); \\r
-       pUdp->UDP_CSR[endpoint] = reg; \\r
-       while ( ( pUdp->UDP_CSR[endpoint] & (flags)) != (flags)); \\r
-}\r
+       pUdp->UDP_CSR[(endpoint)] = reg; \\r
+       while ( ( pUdp->UDP_CSR[(endpoint)] & (flags)) != (flags)); \\r
+} \\r
 \r
        \r
 /* USB standard request code */\r
Impressum, Datenschutz