]> git.donarmstrong.com Git - qmk_firmware.git/blobdiff - tmk_core/protocol/lufa.mk
Merge branch 'master' of github.com:jackhumbert/qmk_firmware
[qmk_firmware.git] / tmk_core / protocol / lufa.mk
index b0f8919007ab3b1428cc37d235e441f1e517b32c..151d26cbc80a16fe78f5ddb6e5406704b633f0b7 100644 (file)
@@ -18,11 +18,11 @@ LUFA_SRC = lufa.c \
           $(LUFA_SRC_USB)
 
 ifeq ($(strip $(MIDI_ENABLE)), yes)
-       LUFA_SRC += midi/midi.c \
-          midi/midi_device.c \
-          midi/bytequeue/bytequeue.c \
-          midi/bytequeue/interrupt_setting.c \
-          $(LUFA_SRC_USBCLASS)
+       include $(TMK_PATH)/protocol/midi.mk
+endif
+
+ifeq ($(strip $(ADAFRUIT_BLE_ENABLE)), yes)
+       LUFA_SRC += $(LUFA_DIR)/adafruit_ble.cpp
 endif
 
 ifeq ($(strip $(BLUETOOTH_ENABLE)), yes)
@@ -30,6 +30,10 @@ ifeq ($(strip $(BLUETOOTH_ENABLE)), yes)
        $(TMK_DIR)/protocol/serial_uart.c
 endif
 
+ifeq ($(strip $(VIRTSER_ENABLE)), yes)
+       LUFA_SRC += $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/CDCClassDevice.c
+endif
+
 SRC += $(LUFA_SRC)
 
 # Search Path
@@ -51,6 +55,11 @@ LUFA_OPTS += -DUSE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABL
 LUFA_OPTS += -DFIXED_CONTROL_ENDPOINT_SIZE=8 
 LUFA_OPTS += -DFIXED_NUM_CONFIGURATIONS=1
 
+# Remote wakeup fix for ATmega32U2        https://github.com/tmk/tmk_keyboard/issues/361
+ifeq ($(MCU),atmega32u2)
+       LUFA_OPTS += -DNO_LIMITED_CONTROLLER_CONNECT
+endif
+
 OPT_DEFS += -DF_USB=$(F_USB)UL
 OPT_DEFS += -DARCH=ARCH_$(ARCH)
 OPT_DEFS += $(LUFA_OPTS)