diff options
author | Ryan <fauxpark@gmail.com> | 2021-09-13 01:22:03 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-12 08:22:03 -0700 |
commit | bcf4551f74a5e96249ccc91d7f5db4f378dca756 (patch) | |
tree | 75607b08b50629d3132d12ca48934b33da2849c3 /common_features.mk | |
parent | 0fa217a5b7cdd035105387fd31c506fda4cfb945 (diff) | |
download | qmk_firmware-bcf4551f74a5e96249ccc91d7f5db4f378dca756.tar.gz qmk_firmware-bcf4551f74a5e96249ccc91d7f5db4f378dca756.zip |
Move Bluetooth config to common_features.mk (#14404)
* Move Bluetooth config to common_features.mk
* Update common_features.mk
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Drashna Jaelre <drashna@live.com>
Diffstat (limited to 'common_features.mk')
-rw-r--r-- | common_features.mk | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/common_features.mk b/common_features.mk index f4f79000b..92e119d35 100644 --- a/common_features.mk +++ b/common_features.mk | |||
@@ -745,3 +745,26 @@ ifeq ($(strip $(USBPD_ENABLE)), yes) | |||
745 | endif | 745 | endif |
746 | endif | 746 | endif |
747 | endif | 747 | endif |
748 | |||
749 | BLUETOOTH_ENABLE ?= no | ||
750 | VALID_BLUETOOTH_DRIVER_TYPES = AdafruitBLE RN42 custom | ||
751 | ifeq ($(strip $(BLUETOOTH_ENABLE)), yes) | ||
752 | ifeq ($(filter $(strip $(BLUETOOTH_DRIVER)),$(VALID_BLUETOOTH_DRIVER_TYPES)),) | ||
753 | $(error "$(BLUETOOTH_DRIVER)" is not a valid Bluetooth driver type) | ||
754 | endif | ||
755 | OPT_DEFS += -DBLUETOOTH_ENABLE | ||
756 | NO_USB_STARTUP_CHECK := yes | ||
757 | SRC += outputselect.c | ||
758 | |||
759 | ifeq ($(strip $(BLUETOOTH_DRIVER)), AdafruitBLE) | ||
760 | OPT_DEFS += -DMODULE_ADAFRUIT_BLE | ||
761 | SRC += analog.c | ||
762 | SRC += $(LUFA_DIR)/adafruit_ble.cpp | ||
763 | QUANTUM_LIB_SRC += spi_master.c | ||
764 | endif | ||
765 | |||
766 | ifeq ($(strip $(BLUETOOTH_DRIVER)), RN42) | ||
767 | OPT_DEFS += DMODULE_RN42 | ||
768 | SRC += $(TMK_DIR)/protocol/serial_uart.c | ||
769 | endif | ||
770 | endif | ||