mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2024-11-10 17:49:32 +08:00
FIX: could be a problem, when not using parnethesis around inparams in #define.
This commit is contained in:
parent
337f703662
commit
06c185d020
1 changed files with 8 additions and 8 deletions
|
@ -177,22 +177,22 @@ const char strDescriptor[] = {
|
||||||
// Clear flags in the UDP_CSR register and waits for synchronization
|
// Clear flags in the UDP_CSR register and waits for synchronization
|
||||||
#define UDP_CLEAR_EP_FLAGS(endpoint, flags) { \
|
#define UDP_CLEAR_EP_FLAGS(endpoint, flags) { \
|
||||||
volatile unsigned int reg; \
|
volatile unsigned int reg; \
|
||||||
reg = pUdp->UDP_CSR[endpoint]; \
|
reg = pUdp->UDP_CSR[(endpoint)]; \
|
||||||
reg |= REG_NO_EFFECT_1_ALL; \
|
reg |= REG_NO_EFFECT_1_ALL; \
|
||||||
reg &= ~(flags); \
|
reg &= ~(flags); \
|
||||||
pUdp->UDP_CSR[endpoint] = reg; \
|
pUdp->UDP_CSR[(endpoint)] = reg; \
|
||||||
while ( (pUdp->UDP_CSR[endpoint] & (flags)) == (flags)); \
|
while ( (pUdp->UDP_CSR[(endpoint)] & (flags)) == (flags)); \
|
||||||
}
|
} \
|
||||||
|
|
||||||
// reset flags in the UDP_CSR register and waits for synchronization
|
// reset flags in the UDP_CSR register and waits for synchronization
|
||||||
#define UDP_SET_EP_FLAGS(endpoint, flags) { \
|
#define UDP_SET_EP_FLAGS(endpoint, flags) { \
|
||||||
volatile unsigned int reg; \
|
volatile unsigned int reg; \
|
||||||
reg = pUdp->UDP_CSR[endpoint]; \
|
reg = pUdp->UDP_CSR[(endpoint)]; \
|
||||||
reg |= REG_NO_EFFECT_1_ALL; \
|
reg |= REG_NO_EFFECT_1_ALL; \
|
||||||
reg |= (flags); \
|
reg |= (flags); \
|
||||||
pUdp->UDP_CSR[endpoint] = reg; \
|
pUdp->UDP_CSR[(endpoint)] = reg; \
|
||||||
while ( ( pUdp->UDP_CSR[endpoint] & (flags)) != (flags)); \
|
while ( ( pUdp->UDP_CSR[(endpoint)] & (flags)) != (flags)); \
|
||||||
}
|
} \
|
||||||
|
|
||||||
|
|
||||||
/* USB standard request code */
|
/* USB standard request code */
|
||||||
|
|
Loading…
Reference in a new issue