From 78f56d9ada226cf146ca5ec110bf4bde52bcf7b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9a=20Saviot?= Date: Wed, 14 Feb 2018 16:52:46 +0100 Subject: [PATCH] [usb] Reset endpoints before setting them up. This fixes an enumaration bug when plugging, un-plugging and re-plugging the calculator. Change-Id: Ifbb4386b46b7492ce2b833e9e4755fd3cfefc708 --- ion/src/device/usb.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/ion/src/device/usb.cpp b/ion/src/device/usb.cpp index 55e69f205..eb4158970 100644 --- a/ion/src/device/usb.cpp +++ b/ion/src/device/usb.cpp @@ -214,6 +214,7 @@ void poll() { /* Handle USB RESET. */ OTG.GINTSTS()->setENUMDNE(true); //Clear the ENUMDNE bit. usb_set_address(0); + usb_endpoints_reset(); usb_endpoint_setup(); return; }