summaryrefslogtreecommitdiffstats
path: root/platforms/chibios/boards
diff options
context:
space:
mode:
authorMichael Stapelberg <stapelberg@users.noreply.github.com>2022-12-08 17:49:58 +0100
committerGitHub <noreply@github.com>2022-12-09 03:49:58 +1100
commit9e103a2c58a546eaf561d87eb99be145b5abcb03 (patch)
tree67a1dc777f7b0b5c0f3a7bb4f032b8c25c37cadc /platforms/chibios/boards
parentc9fe884b26d39d30ca96a4b58249a34cb8a7b3ab (diff)
kint36: do not restart USB stack after wakeup (#19077)
Diffstat (limited to 'platforms/chibios/boards')
-rw-r--r--platforms/chibios/boards/PJRC_TEENSY_3_6/board/board.mk11
-rw-r--r--platforms/chibios/boards/PJRC_TEENSY_3_6/board/extra.c7
2 files changed, 18 insertions, 0 deletions
diff --git a/platforms/chibios/boards/PJRC_TEENSY_3_6/board/board.mk b/platforms/chibios/boards/PJRC_TEENSY_3_6/board/board.mk
new file mode 100644
index 0000000000..aba195db04
--- /dev/null
+++ b/platforms/chibios/boards/PJRC_TEENSY_3_6/board/board.mk
@@ -0,0 +1,11 @@
+include $(CHIBIOS_CONTRIB)/os/hal/boards/PJRC_TEENSY_3_6/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_6/board/extra.c b/platforms/chibios/boards/PJRC_TEENSY_3_6/board/extra.c
new file mode 100644
index 0000000000..4940d6d99b
--- /dev/null
+++ b/platforms/chibios/boards/PJRC_TEENSY_3_6/board/extra.c
@@ -0,0 +1,7 @@
+#include <hal.h>
+
+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.
+}