From 9144e698028ea00a363109935289d6d161b76016 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Sat, 29 Oct 2022 22:21:45 +0200 Subject: [PATCH] Teensy 3.6: do not restart USB stack after wakeup Without this change, the Teensy 3.6 (with QMK firmware) can wake a computer from Suspend-to-RAM, but the keyboard does not actually produce any keypresses until you un-plug and re-plug it. A similar change was needed for the Teensy 4.x as well: https://github.com/ChibiOS/ChibiOS-Contrib/pull/345 related to https://github.com/qmk/qmk_firmware/issues/16934 --- os/hal/boards/PJRC_TEENSY_3_6/board.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/os/hal/boards/PJRC_TEENSY_3_6/board.c b/os/hal/boards/PJRC_TEENSY_3_6/board.c index e59f4ae2c5..3f166e605b 100644 --- a/os/hal/boards/PJRC_TEENSY_3_6/board.c +++ b/os/hal/boards/PJRC_TEENSY_3_6/board.c @@ -214,3 +214,9 @@ void __early_init(void) { */ void boardInit(void) { } + +void restart_usb_driver(USBDriver *usbp) { + // Do nothing. Restarting the USB driver on the Teensy 3.6 breaks it, + // resulting in a keyboard which can wake up a PC from Suspend-to-RAM, but + // does not actually produce any keypresses until you un-plug and re-plug. +}