From: flabbergast Date: Thu, 15 Oct 2015 08:34:51 +0000 (+0100) Subject: ChibiOS/STM32: send remote wakeup. X-Git-Url: https://git.friedersdorff.com/?a=commitdiff_plain;h=6def1045305aaf9c539b5ebbe04232a4c83662ec;p=max%2Ftmk_keyboard.git ChibiOS/STM32: send remote wakeup. --- diff --git a/tmk_core/protocol/chibios/usb_main.c b/tmk_core/protocol/chibios/usb_main.c index 09de7196..382966b9 100644 --- a/tmk_core/protocol/chibios/usb_main.c +++ b/tmk_core/protocol/chibios/usb_main.c @@ -1036,7 +1036,11 @@ void send_remote_wakeup(USBDriver *usbp) { chThdSleepMilliseconds(15); USB0->CTL &= ~USBx_CTL_RESUME; #endif /* KINETIS_USB_USE_USB0 */ -#else /* K20x || KL2x */ +#elif defined(STM32F0XX) /* K20x || KL2x */ + STM32_USB->CNTR |= CNTR_RESUME; + chThdSleepMilliseconds(15); + STM32_USB->CNTR &= ~CNTR_RESUME; +#else /* STM32F0XX */ #warning Sending remote wakeup packet not implemented for your platform. #endif /* K20x || KL2x */ }