From f99b9ba2708ebf5ecbdd62f0c16846789287b24c Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Wed, 19 Oct 2022 17:17:49 +1100 Subject: Widen the ARM Cortex-M family support. Allow USB peripheral change. (#18767) --- tmk_core/protocol/chibios/usb_util.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tmk_core/protocol/chibios/usb_util.c') diff --git a/tmk_core/protocol/chibios/usb_util.c b/tmk_core/protocol/chibios/usb_util.c index a8c7d9a228..9d8b2c4007 100644 --- a/tmk_core/protocol/chibios/usb_util.c +++ b/tmk_core/protocol/chibios/usb_util.c @@ -14,13 +14,14 @@ * along with this program. If not, see . */ #include +#include "usb_main.h" #include "usb_util.h" void usb_disconnect(void) { - usbDisconnectBus(&USBD1); - usbStop(&USBD1); + usbDisconnectBus(&USB_DRIVER); + usbStop(&USB_DRIVER); } bool usb_connected_state(void) { - return usbGetDriverStateI(&USBD1) == USB_ACTIVE; + return usbGetDriverStateI(&USB_DRIVER) == USB_ACTIVE; } -- cgit v1.2.3