aboutsummaryrefslogtreecommitdiffstats
path: root/libmaple
diff options
context:
space:
mode:
Diffstat (limited to 'libmaple')
-rw-r--r--libmaple/usb/stm32f1/usb_cdcacm.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/libmaple/usb/stm32f1/usb_cdcacm.c b/libmaple/usb/stm32f1/usb_cdcacm.c
index df9e6ea..e664797 100644
--- a/libmaple/usb/stm32f1/usb_cdcacm.c
+++ b/libmaple/usb/stm32f1/usb_cdcacm.c
@@ -434,10 +434,9 @@ uint32 usb_cdcacm_tx(const uint8* buf, uint32 len) {
return 0;
}
- // We can only put USB_CDCACM_TX_EPSIZE bytes in the buffer
- /* FIXME then why are we only copying half as many? */
- if (len > USB_CDCACM_TX_EPSIZE / 2) {
- len = USB_CDCACM_TX_EPSIZE / 2;
+ /* We can only put USB_CDCACM_TX_EPSIZE bytes in the buffer. */
+ if (len > USB_CDCACM_TX_EPSIZE) {
+ len = USB_CDCACM_TX_EPSIZE;
}
/* Queue bytes for sending */