summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/mappings/info_rules.hjson2
-rw-r--r--data/schemas/keyboard.jsonschema2
-rw-r--r--docs/config_options.md2
-rw-r--r--docs/ja/config_options.md2
-rw-r--r--docs/reference_info_json.md2
-rw-r--r--keyboards/converter/hp_46010a/keyboard.json3
-rw-r--r--keyboards/converter/hp_46010a/rules.mk1
-rw-r--r--keyboards/geekboards/macropad_v2/config.h2
-rw-r--r--keyboards/geekboards/macropad_v2/keyboard.json3
-rw-r--r--keyboards/ristretto/keyboard.json3
-rw-r--r--keyboards/ristretto/rules.mk1
-rw-r--r--tmk_core/protocol.mk4
-rw-r--r--tmk_core/protocol/chibios/chibios.c7
-rw-r--r--tmk_core/protocol/lufa/lufa.c7
14 files changed, 27 insertions, 14 deletions
diff --git a/data/mappings/info_rules.hjson b/data/mappings/info_rules.hjson
index 35e2e8dfc0..5d08be2fc1 100644
--- a/data/mappings/info_rules.hjson
+++ b/data/mappings/info_rules.hjson
@@ -44,7 +44,7 @@
44 "SPLIT_TRANSPORT": {"info_key": "split.transport.protocol", "to_c": false}, 44 "SPLIT_TRANSPORT": {"info_key": "split.transport.protocol", "to_c": false},
45 "STENO_ENABLE": {"info_key": "stenography.enabled", "value_type": "bool"}, 45 "STENO_ENABLE": {"info_key": "stenography.enabled", "value_type": "bool"},
46 "STENO_PROTOCOL": {"info_key": "stenography.protocol"}, 46 "STENO_PROTOCOL": {"info_key": "stenography.protocol"},
47 "WAIT_FOR_USB": {"info_key": "usb.wait_for", "value_type": "bool"}, 47 "USB_WAIT_FOR_ENUMERATION": {"info_key": "usb.wait_for_enumeration", "value_type": "bool"},
48 "WEAR_LEVELING_DRIVER": {"info_key": "eeprom.wear_leveling.driver"}, 48 "WEAR_LEVELING_DRIVER": {"info_key": "eeprom.wear_leveling.driver"},
49 "WS2812_DRIVER": {"info_key": "ws2812.driver"}, 49 "WS2812_DRIVER": {"info_key": "ws2812.driver"},
50 50
diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema
index f3116fd271..24f7fec9ab 100644
--- a/data/schemas/keyboard.jsonschema
+++ b/data/schemas/keyboard.jsonschema
@@ -894,7 +894,7 @@
894 } 894 }
895 }, 895 },
896 "suspend_wakeup_delay": {"$ref": "qmk.definitions.v1#/unsigned_int"}, 896 "suspend_wakeup_delay": {"$ref": "qmk.definitions.v1#/unsigned_int"},
897 "wait_for": {"type": "boolean"} 897 "wait_for_enumeration": {"type": "boolean"}
898 } 898 }
899 }, 899 },
900 "qmk": { 900 "qmk": {
diff --git a/docs/config_options.md b/docs/config_options.md
index 045d9c0747..fca80e54fd 100644
--- a/docs/config_options.md
+++ b/docs/config_options.md
@@ -446,7 +446,7 @@ Use these to enable or disable building certain features. The more you have enab
446 * Allows replacing the standard matrix scanning routine with a custom one. 446 * Allows replacing the standard matrix scanning routine with a custom one.
447* `DEBOUNCE_TYPE` 447* `DEBOUNCE_TYPE`
448 * Allows replacing the standard key debouncing routine with an alternative or custom one. 448 * Allows replacing the standard key debouncing routine with an alternative or custom one.
449* `WAIT_FOR_USB` 449* `USB_WAIT_FOR_ENUMERATION`
450 * Forces the keyboard to wait for a USB connection to be established before it starts up 450 * Forces the keyboard to wait for a USB connection to be established before it starts up
451* `NO_USB_STARTUP_CHECK` 451* `NO_USB_STARTUP_CHECK`
452 * Disables usb suspend check after keyboard startup. Usually the keyboard waits for the host to wake it up before any tasks are performed. This is useful for split keyboards as one half will not get a wakeup call but must send commands to the master. 452 * Disables usb suspend check after keyboard startup. Usually the keyboard waits for the host to wake it up before any tasks are performed. This is useful for split keyboards as one half will not get a wakeup call but must send commands to the master.
diff --git a/docs/ja/config_options.md b/docs/ja/config_options.md
index a349081d6a..6cc1b6bfcd 100644
--- a/docs/ja/config_options.md
+++ b/docs/ja/config_options.md
@@ -378,7 +378,7 @@ QMK での全ての利用可能な設定にはデフォルトがあります。
378 * 標準マトリックス走査ルーチンを独自のものに置き換えることができます。 378 * 標準マトリックス走査ルーチンを独自のものに置き換えることができます。
379* `DEBOUNCE_TYPE` 379* `DEBOUNCE_TYPE`
380 * 標準キーデバウンスルーチンを代替または独自のものに置き換えることができます。 380 * 標準キーデバウンスルーチンを代替または独自のものに置き換えることができます。
381* `WAIT_FOR_USB` 381* `USB_WAIT_FOR_ENUMERATION`
382 * キーボードが起動する前に、USB 接続が確立されるのをキーボードに待機させます 382 * キーボードが起動する前に、USB 接続が確立されるのをキーボードに待機させます
383* `NO_USB_STARTUP_CHECK` 383* `NO_USB_STARTUP_CHECK`
384 * キーボードの起動後の usb サスペンドチェックを無効にします。通常、キーボードはタスクが実行される前にホストがウェイク アップするのを待ちます。分割キーボードは半分はウェイクアップコールを取得できませんが、マスタにコマンドを送信する必要があるため、役に立ちます。 384 * キーボードの起動後の usb サスペンドチェックを無効にします。通常、キーボードはタスクが実行される前にホストがウェイク アップするのを待ちます。分割キーボードは半分はウェイクアップコールを取得できませんが、マスタにコマンドを送信する必要があるため、役に立ちます。
diff --git a/docs/reference_info_json.md b/docs/reference_info_json.md
index e6bc34e79e..6f0b84c414 100644
--- a/docs/reference_info_json.md
+++ b/docs/reference_info_json.md
@@ -833,7 +833,7 @@ Configures the [Stenography](feature_stenography.md) feature.
833 * `suspend_wakeup_delay` 833 * `suspend_wakeup_delay`
834 * The amount of time to wait after sending a wakeup packet, in milliseconds. 834 * The amount of time to wait after sending a wakeup packet, in milliseconds.
835 * Default: `0` (disabled) 835 * Default: `0` (disabled)
836 * `wait_for` 836 * `wait_for_enumeration`
837 * Force the keyboard to wait for USB enumeration before starting up. 837 * Force the keyboard to wait for USB enumeration before starting up.
838 * Default: `false` 838 * Default: `false`
839 839
diff --git a/keyboards/converter/hp_46010a/keyboard.json b/keyboards/converter/hp_46010a/keyboard.json
index 0296bda5e9..4519306981 100644
--- a/keyboards/converter/hp_46010a/keyboard.json
+++ b/keyboards/converter/hp_46010a/keyboard.json
@@ -6,7 +6,8 @@
6 "usb": { 6 "usb": {
7 "vid": "0xFEED", 7 "vid": "0xFEED",
8 "pid": "0x6060", 8 "pid": "0x6060",
9 "device_version": "0.0.1" 9 "device_version": "0.0.1",
10 "wait_for_enumeration": true
10 }, 11 },
11 "processor": "atmega32u4", 12 "processor": "atmega32u4",
12 "bootloader": "halfkay", 13 "bootloader": "halfkay",
diff --git a/keyboards/converter/hp_46010a/rules.mk b/keyboards/converter/hp_46010a/rules.mk
index 3c6124d20a..857395fb40 100644
--- a/keyboards/converter/hp_46010a/rules.mk
+++ b/keyboards/converter/hp_46010a/rules.mk
@@ -1,4 +1,3 @@
1WAIT_FOR_USB = yes
2CUSTOM_MATRIX = yes 1CUSTOM_MATRIX = yes
3 2
4SRC = matrix.c 3SRC = matrix.c
diff --git a/keyboards/geekboards/macropad_v2/config.h b/keyboards/geekboards/macropad_v2/config.h
index dca98f0c95..e452c886f6 100644
--- a/keyboards/geekboards/macropad_v2/config.h
+++ b/keyboards/geekboards/macropad_v2/config.h
@@ -21,5 +21,3 @@
21#define WS2812_PWM_PAL_MODE 1 21#define WS2812_PWM_PAL_MODE 1
22#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM3 22#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM3
23#define WS2812_PWM_DMA_CHANNEL 3 23#define WS2812_PWM_DMA_CHANNEL 3
24
25#define WAIT_FOR_USB
diff --git a/keyboards/geekboards/macropad_v2/keyboard.json b/keyboards/geekboards/macropad_v2/keyboard.json
index 035a83c157..54d779570a 100644
--- a/keyboards/geekboards/macropad_v2/keyboard.json
+++ b/keyboards/geekboards/macropad_v2/keyboard.json
@@ -6,7 +6,8 @@
6 "usb": { 6 "usb": {
7 "vid": "0x0483", 7 "vid": "0x0483",
8 "pid": "0xA372", 8 "pid": "0xA372",
9 "device_version": "0.0.2" 9 "device_version": "0.0.2",
10 "wait_for_enumeration": true
10 }, 11 },
11 "qmk": { 12 "qmk": {
12 "tap_keycode_delay": 10 13 "tap_keycode_delay": 10
diff --git a/keyboards/ristretto/keyboard.json b/keyboards/ristretto/keyboard.json
index b28f3c1dc1..e8e812b7d2 100644
--- a/keyboards/ristretto/keyboard.json
+++ b/keyboards/ristretto/keyboard.json
@@ -6,7 +6,8 @@
6 "usb": { 6 "usb": {
7 "vid": "0x666B", 7 "vid": "0x666B",
8 "pid": "0x7273", 8 "pid": "0x7273",
9 "device_version": "0.0.1" 9 "device_version": "0.0.1",
10 "wait_for_enumeration": true
10 }, 11 },
11 "features": { 12 "features": {
12 "bootmagic": false, 13 "bootmagic": false,
diff --git a/keyboards/ristretto/rules.mk b/keyboards/ristretto/rules.mk
deleted file mode 100644
index 908e5e972e..0000000000
--- a/keyboards/ristretto/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
1WAIT_FOR_USB = yes
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
67endif 67endif
68 68
69ifeq ($(strip $(USB_WAIT_FOR_ENUMERATION)), yes)
70 OPT_DEFS += -DUSB_WAIT_FOR_ENUMERATION
71endif
72
69ifeq ($(strip $(JOYSTICK_SHARED_EP)), yes) 73ifeq ($(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
70uint8_t keyboard_idle = 0; 75uint8_t keyboard_idle = 0;
71/* 0: Boot Protocol, 1: Report Protocol(default) */ 76/* 0: Boot Protocol, 1: Report Protocol(default) */
72uint8_t keyboard_protocol = 1; 77uint8_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 ;