$(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)
$(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
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)