aboutsummaryrefslogtreecommitdiff
path: root/tmk_core/protocol.mk
diff options
context:
space:
mode:
Diffstat (limited to 'tmk_core/protocol.mk')
-rw-r--r--tmk_core/protocol.mk76
1 files changed, 76 insertions, 0 deletions
diff --git a/tmk_core/protocol.mk b/tmk_core/protocol.mk
index 359ddbfef..a8723e6b2 100644
--- a/tmk_core/protocol.mk
+++ b/tmk_core/protocol.mk
@@ -6,6 +6,82 @@ TMK_COMMON_SRC += \
6 $(PROTOCOL_DIR)/usb_device_state.c \ 6 $(PROTOCOL_DIR)/usb_device_state.c \
7 $(PROTOCOL_DIR)/usb_util.c \ 7 $(PROTOCOL_DIR)/usb_util.c \
8 8
9SHARED_EP_ENABLE = no
10MOUSE_SHARED_EP ?= yes
11ifeq ($(strip $(KEYBOARD_SHARED_EP)), yes)
12 TMK_COMMON_DEFS += -DKEYBOARD_SHARED_EP
13 SHARED_EP_ENABLE = yes
14 # With the current usb_descriptor.c code,
15 # you can't share kbd without sharing mouse;
16 # that would be a very unexpected use case anyway
17 MOUSE_SHARED_EP = yes
18endif
19
20ifeq ($(strip $(MOUSE_ENABLE)), yes)
21 OPT_DEFS += -DMOUSE_ENABLE
22 ifeq ($(strip $(MOUSE_SHARED_EP)), yes)
23 TMK_COMMON_DEFS += -DMOUSE_SHARED_EP
24 SHARED_EP_ENABLE = yes
25 endif
26endif
27
28ifeq ($(strip $(EXTRAKEY_ENABLE)), yes)
29 TMK_COMMON_DEFS += -DEXTRAKEY_ENABLE
30 SHARED_EP_ENABLE = yes
31endif
32
33ifeq ($(strip $(RAW_ENABLE)), yes)
34 TMK_COMMON_DEFS += -DRAW_ENABLE
35endif
36
37ifeq ($(strip $(CONSOLE_ENABLE)), yes)
38 TMK_COMMON_DEFS += -DCONSOLE_ENABLE
39else
40 # TODO: decouple this so other print backends can exist
41 TMK_COMMON_DEFS += -DNO_PRINT
42 TMK_COMMON_DEFS += -DNO_DEBUG
43endif
44
45ifeq ($(strip $(NKRO_ENABLE)), yes)
46 ifeq ($(PROTOCOL), VUSB)
47 $(info NKRO is not currently supported on V-USB, and has been disabled.)
48 else ifeq ($(strip $(BLUETOOTH_ENABLE)), yes)
49 $(info NKRO is not currently supported with Bluetooth, and has been disabled.)
50 else
51 TMK_COMMON_DEFS += -DNKRO_ENABLE
52 SHARED_EP_ENABLE = yes
53 endif
54endif
55
56ifeq ($(strip $(RING_BUFFERED_6KRO_REPORT_ENABLE)), yes)
57 TMK_COMMON_DEFS += -DRING_BUFFERED_6KRO_REPORT_ENABLE
58endif
59
60ifeq ($(strip $(NO_SUSPEND_POWER_DOWN)), yes)
61 TMK_COMMON_DEFS += -DNO_SUSPEND_POWER_DOWN
62endif
63
64ifeq ($(strip $(NO_USB_STARTUP_CHECK)), yes)
65 TMK_COMMON_DEFS += -DNO_USB_STARTUP_CHECK
66endif
67
68ifeq ($(strip $(DIGITIZER_SHARED_EP)), yes)
69 TMK_COMMON_DEFS += -DDIGITIZER_SHARED_EP
70 SHARED_EP_ENABLE = yes
71endif
72
73ifeq ($(strip $(DIGITIZER_ENABLE)), yes)
74 TMK_COMMON_DEFS += -DDIGITIZER_ENABLE
75 ifeq ($(strip $(SHARED_EP_ENABLE)), yes)
76 TMK_COMMON_DEFS += -DDIGITIZER_SHARED_EP
77 SHARED_EP_ENABLE = yes
78 endif
79endif
80
81ifeq ($(strip $(SHARED_EP_ENABLE)), yes)
82 TMK_COMMON_DEFS += -DSHARED_EP_ENABLE
83endif
84
9ifeq ($(strip $(USB_HID_ENABLE)), yes) 85ifeq ($(strip $(USB_HID_ENABLE)), yes)
10 include $(TMK_DIR)/protocol/usb_hid.mk 86 include $(TMK_DIR)/protocol/usb_hid.mk
11endif 87endif