aboutsummaryrefslogtreecommitdiff
path: root/include/libopenstm32
diff options
context:
space:
mode:
Diffstat (limited to 'include/libopenstm32')
-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))
/******************************************************************************