diff options
Diffstat (limited to 'tmk_core')
| -rw-r--r-- | tmk_core/protocol.mk | 4 | ||||
| -rw-r--r-- | tmk_core/protocol/chibios/chibios.c | 7 | ||||
| -rw-r--r-- | tmk_core/protocol/lufa/lufa.c | 7 |
3 files changed, 16 insertions, 2 deletions
diff --git a/tmk_core/protocol.mk b/tmk_core/protocol.mk index fd5342d637..796b4e8787 100644 --- a/tmk_core/protocol.mk +++ b/tmk_core/protocol.mk | |||
| @@ -66,6 +66,10 @@ ifeq ($(strip $(NO_USB_STARTUP_CHECK)), yes) | |||
| 66 | OPT_DEFS += -DNO_USB_STARTUP_CHECK | 66 | OPT_DEFS += -DNO_USB_STARTUP_CHECK |
| 67 | endif | 67 | endif |
| 68 | 68 | ||
| 69 | ifeq ($(strip $(USB_WAIT_FOR_ENUMERATION)), yes) | ||
| 70 | OPT_DEFS += -DUSB_WAIT_FOR_ENUMERATION | ||
| 71 | endif | ||
| 72 | |||
| 69 | ifeq ($(strip $(JOYSTICK_SHARED_EP)), yes) | 73 | ifeq ($(strip $(JOYSTICK_SHARED_EP)), yes) |
| 70 | OPT_DEFS += -DJOYSTICK_SHARED_EP | 74 | OPT_DEFS += -DJOYSTICK_SHARED_EP |
| 71 | SHARED_EP_ENABLE = yes | 75 | SHARED_EP_ENABLE = yes |
diff --git a/tmk_core/protocol/chibios/chibios.c b/tmk_core/protocol/chibios/chibios.c index a02097785f..a249af8d38 100644 --- a/tmk_core/protocol/chibios/chibios.c +++ b/tmk_core/protocol/chibios/chibios.c | |||
| @@ -51,6 +51,11 @@ | |||
| 51 | 51 | ||
| 52 | #define USB_GETSTATUS_REMOTE_WAKEUP_ENABLED (2U) | 52 | #define USB_GETSTATUS_REMOTE_WAKEUP_ENABLED (2U) |
| 53 | 53 | ||
| 54 | #ifdef WAIT_FOR_USB | ||
| 55 | // TODO: Remove backwards compatibility with old define | ||
| 56 | # define USB_WAIT_FOR_ENUMERATION | ||
| 57 | #endif | ||
| 58 | |||
| 54 | /* ------------------------- | 59 | /* ------------------------- |
| 55 | * TMK host driver defs | 60 | * TMK host driver defs |
| 56 | * ------------------------- | 61 | * ------------------------- |
| @@ -143,7 +148,7 @@ void protocol_pre_init(void) { | |||
| 143 | 148 | ||
| 144 | /* Wait until USB is active */ | 149 | /* Wait until USB is active */ |
| 145 | while (true) { | 150 | while (true) { |
| 146 | #if defined(WAIT_FOR_USB) | 151 | #if defined(USB_WAIT_FOR_ENUMERATION) |
| 147 | if (USB_DRIVER.state == USB_ACTIVE) { | 152 | if (USB_DRIVER.state == USB_ACTIVE) { |
| 148 | driver = &chibios_driver; | 153 | driver = &chibios_driver; |
| 149 | break; | 154 | break; |
diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index d6f0c69b6b..2142b04460 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c | |||
| @@ -67,6 +67,11 @@ | |||
| 67 | # include "raw_hid.h" | 67 | # include "raw_hid.h" |
| 68 | #endif | 68 | #endif |
| 69 | 69 | ||
| 70 | #ifdef WAIT_FOR_USB | ||
| 71 | // TODO: Remove backwards compatibility with old define | ||
| 72 | # define USB_WAIT_FOR_ENUMERATION | ||
| 73 | #endif | ||
| 74 | |||
| 70 | uint8_t keyboard_idle = 0; | 75 | uint8_t keyboard_idle = 0; |
| 71 | /* 0: Boot Protocol, 1: Report Protocol(default) */ | 76 | /* 0: Boot Protocol, 1: Report Protocol(default) */ |
| 72 | uint8_t keyboard_protocol = 1; | 77 | uint8_t keyboard_protocol = 1; |
| @@ -807,7 +812,7 @@ void protocol_pre_init(void) { | |||
| 807 | 812 | ||
| 808 | /* wait for USB startup & debug output */ | 813 | /* wait for USB startup & debug output */ |
| 809 | 814 | ||
| 810 | #ifdef WAIT_FOR_USB | 815 | #ifdef USB_WAIT_FOR_ENUMERATION |
| 811 | while (USB_DeviceState != DEVICE_STATE_Configured) { | 816 | while (USB_DeviceState != DEVICE_STATE_Configured) { |
| 812 | # if defined(INTERRUPT_CONTROL_ENDPOINT) | 817 | # if defined(INTERRUPT_CONTROL_ENDPOINT) |
| 813 | ; | 818 | ; |
