diff options
Diffstat (limited to 'testhal/STM32')
-rw-r--r-- | testhal/STM32/STM32F7xx/USB_CDC/main.c | 4 |
1 files changed, 4 insertions, 0 deletions
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);
}
}
|