From 701747ad4feee87fca177beb50823b522cff6e6a Mon Sep 17 00:00:00 2001 From: Ryan Date: Fri, 9 Dec 2022 12:41:22 +1100 Subject: Teensy 3.5: do not restart USB stack after wakeup (#19269) --- platforms/chibios/boards/PJRC_TEENSY_3_5/board/board.mk | 11 +++++++++++ platforms/chibios/boards/PJRC_TEENSY_3_5/board/extra.c | 7 +++++++ 2 files changed, 18 insertions(+) create mode 100644 platforms/chibios/boards/PJRC_TEENSY_3_5/board/board.mk create mode 100644 platforms/chibios/boards/PJRC_TEENSY_3_5/board/extra.c (limited to 'platforms/chibios/boards/PJRC_TEENSY_3_5/board') diff --git a/platforms/chibios/boards/PJRC_TEENSY_3_5/board/board.mk b/platforms/chibios/boards/PJRC_TEENSY_3_5/board/board.mk new file mode 100644 index 0000000000..e129836b08 --- /dev/null +++ b/platforms/chibios/boards/PJRC_TEENSY_3_5/board/board.mk @@ -0,0 +1,11 @@ +include $(CHIBIOS_CONTRIB)/os/hal/boards/PJRC_TEENSY_3_5/board.mk + +# List of all the board related files. +BOARDSRC += $(BOARD_PATH)/board/extra.c + +# Required include directories +BOARDINC += $(BOARD_PATH)/board + +# Shared variables +ALLCSRC += $(BOARDSRC) +ALLINC += $(BOARDINC) diff --git a/platforms/chibios/boards/PJRC_TEENSY_3_5/board/extra.c b/platforms/chibios/boards/PJRC_TEENSY_3_5/board/extra.c new file mode 100644 index 0000000000..4940d6d99b --- /dev/null +++ b/platforms/chibios/boards/PJRC_TEENSY_3_5/board/extra.c @@ -0,0 +1,7 @@ +#include + +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. +} -- cgit v1.2.3