aboutsummaryrefslogtreecommitdiffstats
path: root/core/usb/usb_callbacks.c
diff options
context:
space:
mode:
authorAJM <poslathian@poslathian.(none)>2010-04-25 15:52:04 -0400
committerbnewbold <bnewbold@robocracy.org>2010-05-20 22:09:15 -0400
commitcd172b2d5ed1ff486eab399e4da5af8315cddc8b (patch)
treedefac04445f8b4a9e933132aada4dba56c76285b /core/usb/usb_callbacks.c
parent8d6602547bc7beb39652a35a1cfdddc250f683ff (diff)
downloadlibrambutan-cd172b2d5ed1ff486eab399e4da5af8315cddc8b.tar.gz
librambutan-cd172b2d5ed1ff486eab399e4da5af8315cddc8b.zip
fixed the FIFO bug, tx/rx now seems stable and ready for integration.
Diffstat (limited to 'core/usb/usb_callbacks.c')
-rw-r--r--core/usb/usb_callbacks.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/usb/usb_callbacks.c b/core/usb/usb_callbacks.c
index 1fb73d5..f4c491b 100644
--- a/core/usb/usb_callbacks.c
+++ b/core/usb/usb_callbacks.c
@@ -73,7 +73,7 @@ void vcomDataRxCb(void) {
PMAToUserBufferCopy(&vcomBufferRx[recvBufIn],VCOM_RX_ADDR,tailBytes);
PMAToUserBufferCopy(&vcomBufferRx[0], VCOM_RX_ADDR,remaining);
- recvBufIn += (newBytes % VCOM_RX_EPSIZE);
+ recvBufIn = (recvBufIn + newBytes ) % VCOM_RX_EPSIZE;
}
maxNewBytes -= newBytes;