qmk_firmware

QMK firmware for my keyboards (Corne, Sweep Ferris) and trackball (Ploopy Adept)
Log | Files | Refs | Submodules | LICENSE

protocol.mk (2355B)


      1 SRC +=	\
      2 	$(PROTOCOL_DIR)/host.c \
      3 	$(PROTOCOL_DIR)/report.c \
      4 	$(PROTOCOL_DIR)/usb_device_state.c \
      5 	$(PROTOCOL_DIR)/usb_util.c \
      6 
      7 SHARED_EP_ENABLE = no
      8 MOUSE_SHARED_EP ?= yes
      9 ifeq ($(strip $(KEYBOARD_SHARED_EP)), yes)
     10     OPT_DEFS += -DKEYBOARD_SHARED_EP
     11     SHARED_EP_ENABLE = yes
     12     # With the current usb_descriptor.c code,
     13     # you can't share kbd without sharing mouse;
     14     # that would be a very unexpected use case anyway
     15     MOUSE_SHARED_EP = yes
     16 endif
     17 
     18 ifeq ($(strip $(MOUSE_ENABLE)), yes)
     19     OPT_DEFS += -DMOUSE_ENABLE
     20     ifeq ($(strip $(MOUSE_SHARED_EP)), yes)
     21         OPT_DEFS += -DMOUSE_SHARED_EP
     22         SHARED_EP_ENABLE = yes
     23     endif
     24 endif
     25 
     26 ifeq ($(strip $(EXTRAKEY_ENABLE)), yes)
     27     OPT_DEFS += -DEXTRAKEY_ENABLE
     28     SHARED_EP_ENABLE = yes
     29 endif
     30 
     31 ifeq ($(strip $(PROGRAMMABLE_BUTTON_ENABLE)), yes)
     32     OPT_DEFS += -DPROGRAMMABLE_BUTTON_ENABLE
     33     SHARED_EP_ENABLE = yes
     34 endif
     35 
     36 ifeq ($(strip $(CONSOLE_ENABLE)), yes)
     37     OPT_DEFS += -DCONSOLE_ENABLE
     38 else
     39     # TODO: decouple this so other print backends can exist
     40     OPT_DEFS += -DNO_PRINT
     41     OPT_DEFS += -DNO_DEBUG
     42 endif
     43 
     44 ifeq ($(strip $(NKRO_ENABLE)), yes)
     45     OPT_DEFS += -DNKRO_ENABLE
     46     SHARED_EP_ENABLE = yes
     47 endif
     48 
     49 ifeq ($(strip $(NO_SUSPEND_POWER_DOWN)), yes)
     50     OPT_DEFS += -DNO_SUSPEND_POWER_DOWN
     51 endif
     52 
     53 ifeq ($(strip $(NO_USB_STARTUP_CHECK)), yes)
     54     OPT_DEFS += -DNO_USB_STARTUP_CHECK
     55 endif
     56 
     57 ifeq ($(strip $(USB_WAIT_FOR_ENUMERATION)), yes)
     58     OPT_DEFS += -DUSB_WAIT_FOR_ENUMERATION
     59 endif
     60 
     61 ifeq ($(strip $(JOYSTICK_SHARED_EP)), yes)
     62     OPT_DEFS += -DJOYSTICK_SHARED_EP
     63     SHARED_EP_ENABLE = yes
     64 endif
     65 
     66 ifeq ($(strip $(JOYSTICK_ENABLE)), yes)
     67     OPT_DEFS += -DJOYSTICK_ENABLE
     68     ifeq ($(strip $(SHARED_EP_ENABLE)), yes)
     69         OPT_DEFS += -DJOYSTICK_SHARED_EP
     70         SHARED_EP_ENABLE = yes
     71     endif
     72 endif
     73 
     74 ifeq ($(strip $(DIGITIZER_SHARED_EP)), yes)
     75     OPT_DEFS += -DDIGITIZER_SHARED_EP
     76     SHARED_EP_ENABLE = yes
     77 endif
     78 
     79 ifeq ($(strip $(DIGITIZER_ENABLE)), yes)
     80     OPT_DEFS += -DDIGITIZER_ENABLE
     81     ifeq ($(strip $(SHARED_EP_ENABLE)), yes)
     82         OPT_DEFS += -DDIGITIZER_SHARED_EP
     83         SHARED_EP_ENABLE = yes
     84     endif
     85 endif
     86 
     87 ifeq ($(strip $(SHARED_EP_ENABLE)), yes)
     88     OPT_DEFS += -DSHARED_EP_ENABLE
     89 endif
     90 
     91 ifeq ($(strip $(USB_HID_ENABLE)), yes)
     92     include $(TMK_DIR)/protocol/usb_hid/usb_hid.mk
     93 endif
     94 
     95 # Search Path
     96 VPATH += $(TMK_DIR)/protocol