summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--keyboards/ergodox_infinity/rules.mk7
-rw-r--r--keyboards/k_type/rules.mk3
-rw-r--r--keyboards/whitefox/rules.mk8
-rw-r--r--platforms/chibios/IC_TEENSY_3_1/board/board.c5
-rw-r--r--tmk_core/protocol/chibios/usb_main.c2
5 files changed, 18 insertions, 7 deletions
diff --git a/keyboards/ergodox_infinity/rules.mk b/keyboards/ergodox_infinity/rules.mk
index fbd52cd257..6c490ca0d8 100644
--- a/keyboards/ergodox_infinity/rules.mk
+++ b/keyboards/ergodox_infinity/rules.mk
@@ -4,6 +4,13 @@ MCU = MK20DX256
# Bootloader selection
BOOTLOADER = kiibohd
+# Board: it should exist either in <chibios>/os/hal/boards/
+# or <this_dir>/boards
+# This board was copied from PJRC_TEENSY_3_1. The only difference should be a
+# hack to ensure the watchdog has started before trying to disable it, and an
+# override to disable restart of USB driver after returning from suspend.
+BOARD = IC_TEENSY_3_1
+
# Build Options
# comment out to disable the options.
#
diff --git a/keyboards/k_type/rules.mk b/keyboards/k_type/rules.mk
index 369cab4f09..ffd350ef8a 100644
--- a/keyboards/k_type/rules.mk
+++ b/keyboards/k_type/rules.mk
@@ -7,7 +7,8 @@ BOOTLOADER = kiibohd
# Board: it should exist either in <chibios>/os/hal/boards/
# or <this_dir>/boards
# This board was copied from PJRC_TEENSY_3_1. The only difference should be a
-# hack to ensure the watchdog has started before trying to disable it.
+# hack to ensure the watchdog has started before trying to disable it, and an
+# override to disable restart of USB driver after returning from suspend.
BOARD = IC_TEENSY_3_1
# Build Options
diff --git a/keyboards/whitefox/rules.mk b/keyboards/whitefox/rules.mk
index 7c1d0c3def..cc02f3472e 100644
--- a/keyboards/whitefox/rules.mk
+++ b/keyboards/whitefox/rules.mk
@@ -6,11 +6,9 @@ BOOTLOADER = kiibohd
# Board: it should exist either in <chibios>/os/hal/boards/
# or <this_dir>/boards
-# - BOARD =
-# - PJRC_TEENSY_LC for Teensy LC
-# - PJRC_TEENSY_3 for Teensy 3.0
-# - PJRC_TEENSY_3_1 for Teensy 3.1 or 3.2
-# - MCHCK_K20 for Infinity KB
+# This board was copied from PJRC_TEENSY_3_1. The only difference should be a
+# hack to ensure the watchdog has started before trying to disable it, and an
+# override to disable restart of USB driver after returning from suspend.
BOARD = IC_TEENSY_3_1
# Build Options
diff --git a/platforms/chibios/IC_TEENSY_3_1/board/board.c b/platforms/chibios/IC_TEENSY_3_1/board/board.c
index 36ae8051ee..424e0c975b 100644
--- a/platforms/chibios/IC_TEENSY_3_1/board/board.c
+++ b/platforms/chibios/IC_TEENSY_3_1/board/board.c
@@ -144,3 +144,8 @@ void __early_init(void) {
* @todo Add your board-specific code, if any.
*/
void boardInit(void) {}
+
+
+void restart_usb_driver(USBDriver *usbp) {
+ // Do nothing. Restarting the USB driver on these boards breaks it.
+}
diff --git a/tmk_core/protocol/chibios/usb_main.c b/tmk_core/protocol/chibios/usb_main.c
index 3adbb97994..441cfab970 100644
--- a/tmk_core/protocol/chibios/usb_main.c
+++ b/tmk_core/protocol/chibios/usb_main.c
@@ -705,7 +705,7 @@ void init_usb_driver(USBDriver *usbp) {
chVTObjectInit(&keyboard_idle_timer);
}
-void restart_usb_driver(USBDriver *usbp) {
+__attribute__((weak)) void restart_usb_driver(USBDriver *usbp) {
usbStop(usbp);
usbDisconnectBus(usbp);