From 193a1ed3b822867ac5b17d1bd5cc1202c89fdd10 Mon Sep 17 00:00:00 2001 From: Gareth McMullin Date: Sun, 30 Jan 2011 15:42:12 +1300 Subject: Reset CTR flag for endpoint from usbd_poll if no callback. --- lib/usb/usb_f103.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/usb') diff --git a/lib/usb/usb_f103.c b/lib/usb/usb_f103.c index 1f82def..9b995e4 100644 --- a/lib/usb/usb_f103.c +++ b/lib/usb/usb_f103.c @@ -239,6 +239,8 @@ void usbd_poll(void) if (_usbd_device.user_callback_ctr[ep][type]) _usbd_device.user_callback_ctr[ep][type] (ep); + else + USB_CLR_EP_RX_CTR(ep); } if (istr & USB_ISTR_SUSP) { -- cgit v1.2.3