From 400bb2ae040d1b78f53bf7eb08f68c8b9d8c56c2 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Wed, 9 Feb 2011 20:41:39 +0000 Subject: [PATCH] USB CDC demo working. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2725 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/src/usb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/os/hal/src/usb.c b/os/hal/src/usb.c index afec3c645..08fa52a3e 100644 --- a/os/hal/src/usb.c +++ b/os/hal/src/usb.c @@ -361,6 +361,7 @@ size_t usbReadPacketI(USBDriver *usbp, usbep_t ep, if (usbp->ep[ep]->receiving) return USB_ENDPOINT_BUSY; + usbp->ep[ep]->receiving = TRUE; return usb_lld_read_packet(usbp, ep, buf, n);; } @@ -387,6 +388,7 @@ size_t usbWritePacketI(USBDriver *usbp, usbep_t ep, if (usbp->ep[ep]->transmitting) return USB_ENDPOINT_BUSY; + usbp->ep[ep]->transmitting = TRUE; usb_lld_write_packet(usbp, ep, buf, n); return 0; }