]> git.friedersdorff.com Git - max/tmk_keyboard.git/commitdiff
ChibiOS/STM32: send remote wakeup.
authorflabbergast <s3+flabbergast@sdfeu.org>
Thu, 15 Oct 2015 08:34:51 +0000 (09:34 +0100)
committerflabbergast <s3+flabbergast@sdfeu.org>
Thu, 15 Oct 2015 08:34:51 +0000 (09:34 +0100)
tmk_core/protocol/chibios/usb_main.c

index 09de7196368d47eba1cdcb26060d3daa332760a5..382966b9a25ab2e7e34fdeef0c99d55fcbd40947 100644 (file)
@@ -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 */
 }