FIX: could be a problem, when not using parnethesis around inparams in #define.

This commit is contained in:
iceman1001 2016-09-26 12:30:34 +02:00
parent 337f703662
commit 06c185d020

View file

@ -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 */