From db0b9dbf0bcce6b53647bd3bd25ff88e45794f16 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sat, 28 Nov 2015 10:18:46 +0000 Subject: Fixed bug #674. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8536 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- testhal/STM32/STM32F7xx/USB_CDC/main.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'testhal/STM32') diff --git a/testhal/STM32/STM32F7xx/USB_CDC/main.c b/testhal/STM32/STM32F7xx/USB_CDC/main.c index d992623c0..73ad1ef18 100644 --- a/testhal/STM32/STM32F7xx/USB_CDC/main.c +++ b/testhal/STM32/STM32F7xx/USB_CDC/main.c @@ -213,6 +213,10 @@ int main(void) { chThdRelease(shelltp); /* Recovers memory of the previous shell. */ shelltp = NULL; /* Triggers spawning of a new shell. */ } + if (palReadPad(GPIOI, GPIOI_BUTTON_USER)) { + usbDisconnectBus(serusbcfg.usbp); + usbStop(serusbcfg.usbp); + } chThdSleepMilliseconds(1000); } } -- cgit v1.2.3