aboutsummaryrefslogtreecommitdiffstats
path: root/libmaple/usb
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2011-02-09 17:55:45 -0500
committerMarti Bolivar <mbolivar@leaflabs.com>2011-02-09 17:55:45 -0500
commit7366564129bf4e4030e9083f4521eda49d985fb8 (patch)
tree403914a8e3fa609e4c19d97ba61cb585e7391d97 /libmaple/usb
parent90adb6bff63e3ecad81d300651a40d8835efc608 (diff)
downloadlibrambutan-7366564129bf4e4030e9083f4521eda49d985fb8.tar.gz
librambutan-7366564129bf4e4030e9083f4521eda49d985fb8.zip
Fixing usb.c countTx race; thanks, geoffreymbrown!
Diffstat (limited to 'libmaple/usb')
-rw-r--r--libmaple/usb/usb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libmaple/usb/usb.c b/libmaple/usb/usb.c
index 923e54b..39bf31a 100644
--- a/libmaple/usb/usb.c
+++ b/libmaple/usb/usb.c
@@ -376,8 +376,8 @@ uint16 usbSendBytes(uint8* sendBuf, uint16 len) {
if (loaded) {
UserToPMABufferCopy(sendBuf,VCOM_TX_ADDR + countTx, loaded);
_SetEPTxCount(VCOM_TX_ENDP, countTx+loaded);
- _SetEPTxValid(VCOM_TX_ENDP);
countTx += loaded;
+ _SetEPTxValid(VCOM_TX_ENDP);
}
return loaded;