From cd172b2d5ed1ff486eab399e4da5af8315cddc8b Mon Sep 17 00:00:00 2001 From: AJM Date: Sun, 25 Apr 2010 15:52:04 -0400 Subject: fixed the FIFO bug, tx/rx now seems stable and ready for integration. --- core/usb/usb_callbacks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/usb/usb_callbacks.c') 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; -- cgit v1.2.3