aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGareth McMullin2010-11-04 18:20:28 +1300
committerGareth McMullin2010-11-04 18:20:28 +1300
commit5bba6d92068f869c880d8fe59712343146f63391 (patch)
tree3fe4fa775cd66225ed0614b323ef0e0c06824c91 /include
parent87960830f4eb656f410ff3b220151e0b5ad9a556 (diff)
Fixed logic for clearing data toggle bits.
Diffstat (limited to 'include')
-rw-r--r--include/libopenstm32/usb.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/libopenstm32/usb.h b/include/libopenstm32/usb.h
index 6edfee3..608ee58 100644
--- a/include/libopenstm32/usb.h
+++ b/include/libopenstm32/usb.h
@@ -247,13 +247,13 @@
/* Macros for clearing DTOG bits */
#define USB_CLR_EP_TX_DTOG(EP) \
SET_REG(USB_EP_REG(EP), \
- (GET_REG(USB_EP_REG(EP)) & \
- USB_EP_NTOGGLE_MSK) | USB_EP_TX_DTOG)
+ GET_REG(USB_EP_REG(EP)) & \
+ (USB_EP_NTOGGLE_MSK | USB_EP_TX_DTOG))
#define USB_CLR_EP_RX_DTOG(EP) \
SET_REG(USB_EP_REG(EP), \
- (GET_REG(USB_EP_REG(EP)) & \
- USB_EP_NTOGGLE_MSK) | USB_EP_RX_DTOG)
+ GET_REG(USB_EP_REG(EP)) & \
+ (USB_EP_NTOGGLE_MSK | USB_EP_RX_DTOG))
/******************************************************************************