]> cvs.zerfleddert.de Git - proxmark3-svn/commitdiff
FIX: could be a problem, when not using parnethesis around inparams in #define.
authoriceman1001 <iceman@iuse.se>
Mon, 26 Sep 2016 10:30:34 +0000 (12:30 +0200)
committericeman1001 <iceman@iuse.se>
Mon, 26 Sep 2016 10:30:34 +0000 (12:30 +0200)
common/usb_cdc.c

index 5111ac1fe84cbc7a71bf38afcab48394dd22ed9a..9a24dc135876718d77a46975a1369bdb07a091ab 100644 (file)
@@ -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