From bcf4551f74a5e96249ccc91d7f5db4f378dca756 Mon Sep 17 00:00:00 2001 From: Ryan Date: Mon, 13 Sep 2021 01:22:03 +1000 Subject: [PATCH] Move Bluetooth config to common_features.mk (#14404) * Move Bluetooth config to common_features.mk * Update common_features.mk Co-authored-by: Drashna Jaelre Co-authored-by: Drashna Jaelre --- common_features.mk | 23 ++++++++++++++++ disable_features.mk | 1 - docs/feature_bluetooth.md | 19 ++++++------- keyboards/10bleoledhub/rules.mk | 4 +-- .../mf68/keymaps/mf68_ble/rules.mk | 3 ++- keyboards/atreus/feather/rules.mk | 3 ++- keyboards/converter/adb_usb/rules.mk | 1 - keyboards/converter/m0110_usb/rules.mk | 1 - keyboards/converter/usb_usb/ble/rules.mk | 6 ++--- keyboards/handwired/42/rules.mk | 3 ++- keyboards/handwired/bdn9_ble/rules.mk | 3 ++- keyboards/handwired/fruity60/rules.mk | 4 +-- keyboards/handwired/hacked_motospeed/rules.mk | 5 ++-- keyboards/handwired/prkl30/feather/rules.mk | 4 ++- .../promethium/keymaps/default/rules.mk | 2 -- .../promethium/keymaps/priyadi/rules.mk | 2 -- keyboards/handwired/promethium/rules.mk | 4 +-- keyboards/handwired/pterodactyl/rules.mk | 4 +-- keyboards/handwired/slash/rules.mk | 4 +-- keyboards/laptreus/rules.mk | 4 +-- keyboards/latin47ble/rules.mk | 4 +-- keyboards/latin64ble/rules.mk | 4 +-- keyboards/latinpadble/rules.mk | 4 +-- keyboards/meira/featherble/rules.mk | 2 +- keyboards/nek_type_a/rules.mk | 4 +-- .../spaceman/pancake/rev1/feather/rules.mk | 3 ++- keyboards/tokyokeyboard/alix40/rules.mk | 4 +-- show_options.mk | 2 +- tmk_core/common.mk | 19 ------------- tmk_core/protocol/lufa.mk | 27 ------------------- users/wanleg/rules.mk | 4 +-- 31 files changed, 78 insertions(+), 99 deletions(-) diff --git a/common_features.mk b/common_features.mk index f4f79000b392d58da663c17bb779f94f54f9e431..92e119d35ed3e37e08f62573f8a7c09a2afd738c 100644 --- a/common_features.mk +++ b/common_features.mk @@ -745,3 +745,26 @@ ifeq ($(strip $(USBPD_ENABLE)), yes) endif endif endif + +BLUETOOTH_ENABLE ?= no +VALID_BLUETOOTH_DRIVER_TYPES = AdafruitBLE RN42 custom +ifeq ($(strip $(BLUETOOTH_ENABLE)), yes) + ifeq ($(filter $(strip $(BLUETOOTH_DRIVER)),$(VALID_BLUETOOTH_DRIVER_TYPES)),) + $(error "$(BLUETOOTH_DRIVER)" is not a valid Bluetooth driver type) + endif + OPT_DEFS += -DBLUETOOTH_ENABLE + NO_USB_STARTUP_CHECK := yes + SRC += outputselect.c + + ifeq ($(strip $(BLUETOOTH_DRIVER)), AdafruitBLE) + OPT_DEFS += -DMODULE_ADAFRUIT_BLE + SRC += analog.c + SRC += $(LUFA_DIR)/adafruit_ble.cpp + QUANTUM_LIB_SRC += spi_master.c + endif + + ifeq ($(strip $(BLUETOOTH_DRIVER)), RN42) + OPT_DEFS += DMODULE_RN42 + SRC += $(TMK_DIR)/protocol/serial_uart.c + endif +endif diff --git a/disable_features.mk b/disable_features.mk index 84d8316eac9c692b2b05daf52b5498fda259eca4..eeae688850977a061d9f92d524a16f4cf12e70dc 100644 --- a/disable_features.mk +++ b/disable_features.mk @@ -1,7 +1,6 @@ # Unconditionally disable features that a keyboard advertises it doesn't support FEATURE_NAMES := -FEATURE_NAMES += ADAFRUIT_BLE FEATURE_NAMES += AUDIO FEATURE_NAMES += BACKLIGHT FEATURE_NAMES += BLUETOOTH diff --git a/docs/feature_bluetooth.md b/docs/feature_bluetooth.md index 08e5f24ac558bf214b642b8953a8fdf424f5d31a..7860ad54787bdc4009103e62d46ae4195c395841 100644 --- a/docs/feature_bluetooth.md +++ b/docs/feature_bluetooth.md @@ -4,10 +4,10 @@ Currently Bluetooth support is limited to AVR based chips. For Bluetooth 2.1, QMK has support for RN-42 modules. For more recent BLE protocols, currently only the Adafruit Bluefruit SPI Friend is directly supported. BLE is needed to connect to iOS devices. Note iOS does not support mouse input. -|Board |Bluetooth Protocol |Connection Type |rules.mk |Bluetooth Chip| -|----------------------------------------------------------------|----------------------------|----------------|---------------------------|--------------| -|Roving Networks RN-42 (Sparkfun Bluesmirf) |Bluetooth Classic | UART |`BLUETOOTH = RN42` | RN-42 | -|[Bluefruit LE SPI Friend](https://www.adafruit.com/product/2633)|Bluetooth Low Energy | SPI |`BLUETOOTH = AdafruitBLE` | nRF51822 | +|Board |Bluetooth Protocol |Connection Type|rules.mk |Bluetooth Chip| +|----------------------------------------------------------------|--------------------|---------------|--------------------------------|--------------| +|Roving Networks RN-42 (Sparkfun Bluesmirf) |Bluetooth Classic |UART |`BLUETOOTH_DRIVER = RN42` |RN-42 | +|[Bluefruit LE SPI Friend](https://www.adafruit.com/product/2633)|Bluetooth Low Energy|SPI |`BLUETOOTH_DRIVER = AdafruitBLE`|nRF51822 | Not Supported Yet but possible: * [Bluefruit LE UART Friend](https://www.adafruit.com/product/2479). [Possible tmk implementation found in](https://github.com/tmk/tmk_keyboard/issues/514) @@ -23,16 +23,17 @@ Currently The only bluetooth chipset supported by QMK is the Adafruit Bluefruit A Bluefruit UART friend can be converted to an SPI friend, however this [requires](https://github.com/qmk/qmk_firmware/issues/2274) some reflashing and soldering directly to the MDBT40 chip. - ## Bluetooth Rules.mk Options The currently supported Bluetooth chipsets do not support [N-Key Rollover (NKRO)](reference_glossary.md#n-key-rollover-nkro), so `rules.mk` must contain `NKRO_ENABLE = no`. -Use only one of these to enable Bluetooth: -* BLUETOOTH_ENABLE = yes (Legacy Option) -* BLUETOOTH = RN42 -* BLUETOOTH = AdafruitBLE +Add the following to your `rules.mk`: + +```makefile +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = AdafruitBLE # or RN42 +``` ## Bluetooth Keycodes diff --git a/keyboards/10bleoledhub/rules.mk b/keyboards/10bleoledhub/rules.mk index 1e036e660c8e10fd8f4a91806f522309cfd3d4b4..700f7e8f773b77653eaa66233de49fcd0da58891 100644 --- a/keyboards/10bleoledhub/rules.mk +++ b/keyboards/10bleoledhub/rules.mk @@ -21,9 +21,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output -BLUETOOTH = AdafruitBLE +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = AdafruitBLE OLED_ENABLE = yes OLED_DRIVER = SSD1306 ENCODER_ENABLE = yes diff --git a/keyboards/40percentclub/mf68/keymaps/mf68_ble/rules.mk b/keyboards/40percentclub/mf68/keymaps/mf68_ble/rules.mk index 2a4ff658cf211dbd475fc97f326b6deaf5c707c9..160b3684b3c4c75938db6e6a155f9356198db6d7 100644 --- a/keyboards/40percentclub/mf68/keymaps/mf68_ble/rules.mk +++ b/keyboards/40percentclub/mf68/keymaps/mf68_ble/rules.mk @@ -4,5 +4,6 @@ F_CPU = 8000000 # Build Options # change yes to no to disable # -BLUETOOTH = AdafruitBLE +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = AdafruitBLE BACKLIGHT_ENABLE = no diff --git a/keyboards/atreus/feather/rules.mk b/keyboards/atreus/feather/rules.mk index 35d74315394b5eecf7cf0cb4420971cf7944883d..ad0b4a5046bed9b8d543092775910cc911213fe7 100644 --- a/keyboards/atreus/feather/rules.mk +++ b/keyboards/atreus/feather/rules.mk @@ -10,5 +10,6 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BLUETOOTH = AdafruitBLE +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = AdafruitBLE CONSOLE_ENABLE = no diff --git a/keyboards/converter/adb_usb/rules.mk b/keyboards/converter/adb_usb/rules.mk index 56967770b3b1c646ec5977f0dbaaff4f779fc209..7c861e2702adcae721d51809e8995b1521f5c7c5 100644 --- a/keyboards/converter/adb_usb/rules.mk +++ b/keyboards/converter/adb_usb/rules.mk @@ -16,7 +16,6 @@ NKRO_ENABLE = no # USB Nkey Rollover - not yet supported in LUFA EXTRAKEY_ENABLE = yes USB_HID_ENABLE = yes BACKLIGHT_ENABLE = no -#BLUETOOTH = AdafruitBLE # For Adafruit Feather 32U4 BLE support, uncomment this line CUSTOM_MATRIX = yes SRC = matrix.c adb.c led.c diff --git a/keyboards/converter/m0110_usb/rules.mk b/keyboards/converter/m0110_usb/rules.mk index f59530ce46108cad69ebc7b9a887d9f95e4ddb9b..288b1729f030eb00a006f0c2c2764c3eb5c12154 100644 --- a/keyboards/converter/m0110_usb/rules.mk +++ b/keyboards/converter/m0110_usb/rules.mk @@ -19,7 +19,6 @@ NKRO_ENABLE = no # USB Nkey Rollover - not yet supported in LUFA EXTRAKEY_ENABLE = yes USB_HID_ENABLE = yes BACKLIGHT_ENABLE = no -#BLUETOOTH = AdafruitBLE # For Adafruit Feather 32U4 BLE support, uncomment this line CUSTOM_MATRIX = yes SRC = matrix.c m0110.c diff --git a/keyboards/converter/usb_usb/ble/rules.mk b/keyboards/converter/usb_usb/ble/rules.mk index 76af3e1fa36cb617bc37cc409ea33d5cca811861..0a6496ba4329a29d9e1187a811b9c9a8c22fe546 100644 --- a/keyboards/converter/usb_usb/ble/rules.mk +++ b/keyboards/converter/usb_usb/ble/rules.mk @@ -13,9 +13,9 @@ NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 -BLUETOOTH = AdafruitBLE -ADAFRUIT_BLE_ENABLE = yes + +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = AdafruitBLE EXTRAFLAGS += -flto diff --git a/keyboards/handwired/42/rules.mk b/keyboards/handwired/42/rules.mk index a61114628f1146622a45bed5dae0968b314dfb82..b5764728bc750ddfd56aaa9e729b16f3c65b4b2e 100644 --- a/keyboards/handwired/42/rules.mk +++ b/keyboards/handwired/42/rules.mk @@ -26,4 +26,5 @@ AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode UNICODEMAP_ENABLE = no # ^^ UCIS_ENABLE = no # ^^ -BLUETOOTH = AdafruitBLE +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = AdafruitBLE diff --git a/keyboards/handwired/bdn9_ble/rules.mk b/keyboards/handwired/bdn9_ble/rules.mk index c3518e6457fbd16036540f23ecd7f12ad435924a..03e354b9d76986453daec81c5f799362d84b216a 100644 --- a/keyboards/handwired/bdn9_ble/rules.mk +++ b/keyboards/handwired/bdn9_ble/rules.mk @@ -22,6 +22,7 @@ NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow UNICODE_ENABLE = no # Unicode -BLUETOOTH = AdafruitBLE # Enable Bluetooth AUDIO_ENABLE = no # Audio output on port C6 ENCODER_ENABLE = no +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = AdafruitBLE diff --git a/keyboards/handwired/fruity60/rules.mk b/keyboards/handwired/fruity60/rules.mk index 1dfc9007abb06e5dd646cf7ab63e45317a153a21..37f8de998ee913b2ca223f8fae53b86c85ceb52f 100644 --- a/keyboards/handwired/fruity60/rules.mk +++ b/keyboards/handwired/fruity60/rules.mk @@ -22,8 +22,8 @@ NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 -BLUETOOTH = AdafruitBLE +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = AdafruitBLE LAYOUTS = 60_tsangan_hhkb diff --git a/keyboards/handwired/hacked_motospeed/rules.mk b/keyboards/handwired/hacked_motospeed/rules.mk index 7ba6a3af7f5c2d013e7f59ad7ee77447c0d46bec..0228be52c4278ae55bcdd3f4d4eb8a18464fdd97 100644 --- a/keyboards/handwired/hacked_motospeed/rules.mk +++ b/keyboards/handwired/hacked_motospeed/rules.mk @@ -19,7 +19,8 @@ NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 NO_USB_STARTUP_CHECK = yes # Disable initialization only when usb is plugged in -BLUETOOTH = RN42 +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = RN42 + diff --git a/keyboards/handwired/prkl30/feather/rules.mk b/keyboards/handwired/prkl30/feather/rules.mk index 6357015126a225404c37528035e52b3bfed1e936..df2aa7f1db5e4b2d9c7edd4f1a73999872795b4a 100644 --- a/keyboards/handwired/prkl30/feather/rules.mk +++ b/keyboards/handwired/prkl30/feather/rules.mk @@ -10,7 +10,6 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BLUETOOTH = AdafruitBLE BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite ENCODER_ENABLE = yes MOUSEKEY_ENABLE = no # Mouse keys @@ -22,3 +21,6 @@ NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here BACKLIGHT_ENABLE = no AUDIO_ENABLE = no # This can be enabled if a speaker is connected to the expansion port. Not compatible with RGBLIGHT below RGBLIGHT_ENABLE = no # This can be enabled if a ws2812 strip is connected to the expansion port. + +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = AdafruitBLE diff --git a/keyboards/handwired/promethium/keymaps/default/rules.mk b/keyboards/handwired/promethium/keymaps/default/rules.mk index 4fd9b656b67e187828a3f570705e2d12cf13a611..96db4fcbbcb80ade8a22a7b63dafa135d9d354ad 100644 --- a/keyboards/handwired/promethium/keymaps/default/rules.mk +++ b/keyboards/handwired/promethium/keymaps/default/rules.mk @@ -15,11 +15,9 @@ MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode UNICODEMAP_ENABLE = yes -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. PS2_MOUSE_ENABLE = yes PS2_USE_INT = yes -BLUETOOTH = AdafruitBLE # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/handwired/promethium/keymaps/priyadi/rules.mk b/keyboards/handwired/promethium/keymaps/priyadi/rules.mk index 4fd9b656b67e187828a3f570705e2d12cf13a611..96db4fcbbcb80ade8a22a7b63dafa135d9d354ad 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/rules.mk +++ b/keyboards/handwired/promethium/keymaps/priyadi/rules.mk @@ -15,11 +15,9 @@ MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode UNICODEMAP_ENABLE = yes -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. PS2_MOUSE_ENABLE = yes PS2_USE_INT = yes -BLUETOOTH = AdafruitBLE # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/handwired/promethium/rules.mk b/keyboards/handwired/promethium/rules.mk index 960d6378196ff955b251909d4a8e0baee66d22c6..aa5a13457f2c2d6e44596009e53fd3b4f3cee5f3 100644 --- a/keyboards/handwired/promethium/rules.mk +++ b/keyboards/handwired/promethium/rules.mk @@ -21,12 +21,12 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode UNICODEMAP_ENABLE = yes -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. PS2_MOUSE_ENABLE = yes PS2_USE_INT = yes CUSTOM_MATRIX = yes -BLUETOOTH = AdafruitBLE +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = AdafruitBLE # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/handwired/pterodactyl/rules.mk b/keyboards/handwired/pterodactyl/rules.mk index 56f83265d9d54432c88f9f99a03a8e3c7e9700bf..7c8e3c33866d5d75310956de12ec6edc94e09412 100644 --- a/keyboards/handwired/pterodactyl/rules.mk +++ b/keyboards/handwired/pterodactyl/rules.mk @@ -21,11 +21,11 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output -BLUETOOTH = AdafruitBLE UNICODE_ENABLE = yes CUSTOM_MATRIX = yes +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = AdafruitBLE SRC += matrix.c QUANTUM_LIB_SRC += i2c_master.c diff --git a/keyboards/handwired/slash/rules.mk b/keyboards/handwired/slash/rules.mk index e2e8c93e306494e6ce83e968b8acdc58647ae076..8974ac7852675d1341dc1faa82a353ebc14db1e2 100644 --- a/keyboards/handwired/slash/rules.mk +++ b/keyboards/handwired/slash/rules.mk @@ -22,6 +22,6 @@ NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow UNICODE_ENABLE = no # Unicode -#BLUETOOTH_ENABLE = Yes # Enable Bluetooth with the Adafruit EZ-Key HID -BLUETOOTH = AdafruitBLE AUDIO_ENABLE = no # Audio output on port C6 +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = AdafruitBLE diff --git a/keyboards/laptreus/rules.mk b/keyboards/laptreus/rules.mk index 5810f98a5745da5af00fccd898c4976b18307299..ba916ec136af285de64ec88914f0e287fae43e07 100644 --- a/keyboards/laptreus/rules.mk +++ b/keyboards/laptreus/rules.mk @@ -25,5 +25,5 @@ TAP_DANCE_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -BLUETOOTH_ENABLE = no # Legacy bluetooth support -BLUETOOTH = AdafruitBLE +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = AdafruitBLE diff --git a/keyboards/latin47ble/rules.mk b/keyboards/latin47ble/rules.mk index 5a3f1069a35a070d341e44a1b2d59767ae3f2565..61d3be26e6a472417560b5e4f8bc1d79b76fe10d 100644 --- a/keyboards/latin47ble/rules.mk +++ b/keyboards/latin47ble/rules.mk @@ -21,8 +21,8 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output -BLUETOOTH = AdafruitBLE +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = AdafruitBLE LAYOUTS = planck_mit diff --git a/keyboards/latin64ble/rules.mk b/keyboards/latin64ble/rules.mk index b4d726a60d15fa5f2945f5ecb1f459ee0000feae..ba3f750117c9ddc847655e241051afbcfae0ed02 100644 --- a/keyboards/latin64ble/rules.mk +++ b/keyboards/latin64ble/rules.mk @@ -21,6 +21,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output -BLUETOOTH = AdafruitBLE +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = AdafruitBLE diff --git a/keyboards/latinpadble/rules.mk b/keyboards/latinpadble/rules.mk index b36d9a88cbd0843d7a9cd73913dae89af445aa3f..eca33fc0a014af338bd8dec28099c4ed92d3c550 100644 --- a/keyboards/latinpadble/rules.mk +++ b/keyboards/latinpadble/rules.mk @@ -21,10 +21,10 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output -BLUETOOTH = AdafruitBLE +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = AdafruitBLE OLED_ENABLE = yes OLED_DRIVER = SSD1306 ENCODER_ENABLE = yes diff --git a/keyboards/meira/featherble/rules.mk b/keyboards/meira/featherble/rules.mk index b0295ced77795cd86031415e6ae42ddd323c8953..d3e985e8c239613f21190ce23c0d3136b9da7ead 100644 --- a/keyboards/meira/featherble/rules.mk +++ b/keyboards/meira/featherble/rules.mk @@ -2,4 +2,4 @@ F_CPU = 8000000 BLUETOOTH_ENABLE = yes -BLUETOOTH = AdafruitBLE +BLUETOOTH_DRIVER = AdafruitBLE diff --git a/keyboards/nek_type_a/rules.mk b/keyboards/nek_type_a/rules.mk index 0f13c245fcc3aa2a637dc510d5fa9174c7a9a81a..d8e2234ba00540690ca21079fefe238d5444fd7b 100644 --- a/keyboards/nek_type_a/rules.mk +++ b/keyboards/nek_type_a/rules.mk @@ -19,10 +19,10 @@ NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 CUSTOM_MATRIX = yes DEBUG_ENABLE = yes -BLUETOOTH = AdafruitBLE +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = AdafruitBLE SRC += matrix.c mcp23017.c diff --git a/keyboards/spaceman/pancake/rev1/feather/rules.mk b/keyboards/spaceman/pancake/rev1/feather/rules.mk index b749dc232751bc9641cacc52d137aa7b3b9d678b..a2ddd81a9c6a890d332a39597b1d6edf5ca01228 100644 --- a/keyboards/spaceman/pancake/rev1/feather/rules.mk +++ b/keyboards/spaceman/pancake/rev1/feather/rules.mk @@ -10,7 +10,6 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BLUETOOTH = AdafruitBLE BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control @@ -21,6 +20,8 @@ NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https: BACKLIGHT_ENABLE = no # Custom backlighting code is used, so this should not be enabled AUDIO_ENABLE = no # This can be enabled if a speaker is connected to the expansion port. Not compatible with RGBLIGHT below RGBLIGHT_ENABLE = no # This can be enabled if a ws2812 strip is connected to the expansion port. +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = AdafruitBLE LAYOUTS = ortho_4x12 planck_mit diff --git a/keyboards/tokyokeyboard/alix40/rules.mk b/keyboards/tokyokeyboard/alix40/rules.mk index 5fedaed8350a12cc2ac0996ec78df78536921dd6..7f44c1325ce010533c91ae3c247c79030ca5690b 100644 --- a/keyboards/tokyokeyboard/alix40/rules.mk +++ b/keyboards/tokyokeyboard/alix40/rules.mk @@ -21,6 +21,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output -BLUETOOTH = AdafruitBLE +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = AdafruitBLE diff --git a/show_options.mk b/show_options.mk index ce2f9c06360ae1fd1535c4cb0746ba9cf6e85b33..cb3a32d39a0eb795556b90f1d12ff6e452eb323b 100644 --- a/show_options.mk +++ b/show_options.mk @@ -25,6 +25,7 @@ HARDWARE_OPTION_NAMES = \ CIE1931_CURVE \ MIDI_ENABLE \ BLUETOOTH_ENABLE \ + BLUETOOTH_DRIVER \ AUDIO_ENABLE \ HD44780_ENABLE \ ENCODER_ENABLE \ @@ -57,7 +58,6 @@ OTHER_OPTION_NAMES = \ LED_ANIMATIONS \ IOS_DEVICE_ENABLE \ HELIX ZINC \ - ADAFRUIT_BLE_ENABLE \ AUTOLOG_ENABLE \ DEBUG_ENABLE \ ENCODER_ENABLE_CUSTOM \ diff --git a/tmk_core/common.mk b/tmk_core/common.mk index 7f7420059072f3aeff65f0741c6584917bc11bbb..e5eced56fd585f36344a952f7601808d1c39c31a 100644 --- a/tmk_core/common.mk +++ b/tmk_core/common.mk @@ -55,8 +55,6 @@ ifeq ($(strip $(NKRO_ENABLE)), yes) $(info NKRO is not currently supported on V-USB, and has been disabled.) else ifeq ($(strip $(BLUETOOTH_ENABLE)), yes) $(info NKRO is not currently supported with Bluetooth, and has been disabled.) - else ifneq ($(BLUETOOTH),) - $(info NKRO is not currently supported with Bluetooth, and has been disabled.) else TMK_COMMON_DEFS += -DNKRO_ENABLE SHARED_EP_ENABLE = yes @@ -77,23 +75,6 @@ ifeq ($(strip $(NO_SUSPEND_POWER_DOWN)), yes) TMK_COMMON_DEFS += -DNO_SUSPEND_POWER_DOWN endif -ifeq ($(strip $(BLUETOOTH_ENABLE)), yes) - TMK_COMMON_DEFS += -DBLUETOOTH_ENABLE - TMK_COMMON_DEFS += -DNO_USB_STARTUP_CHECK -endif - -ifeq ($(strip $(BLUETOOTH)), AdafruitBLE) - TMK_COMMON_DEFS += -DBLUETOOTH_ENABLE - TMK_COMMON_DEFS += -DMODULE_ADAFRUIT_BLE - TMK_COMMON_DEFS += -DNO_USB_STARTUP_CHECK -endif - -ifeq ($(strip $(BLUETOOTH)), RN42) - TMK_COMMON_DEFS += -DBLUETOOTH_ENABLE - TMK_COMMON_DEFS += -DMODULE_RN42 - TMK_COMMON_DEFS += -DNO_USB_STARTUP_CHECK -endif - ifeq ($(strip $(SWAP_HANDS_ENABLE)), yes) TMK_COMMON_DEFS += -DSWAP_HANDS_ENABLE endif diff --git a/tmk_core/protocol/lufa.mk b/tmk_core/protocol/lufa.mk index c8935dacb764449e7e1809efe699962fc6d01cbb..00fec478acff43a1dd991863cf0637147cf3d7c9 100644 --- a/tmk_core/protocol/lufa.mk +++ b/tmk_core/protocol/lufa.mk @@ -3,7 +3,6 @@ LUFA_DIR = protocol/lufa # Path to the LUFA library LUFA_PATH = $(LIB_PATH)/lufa - # Create the LUFA source path variables by including the LUFA makefile ifneq (, $(wildcard $(LUFA_PATH)/LUFA/Build/lufa_sources.mk)) # New build system from 20120730 @@ -22,23 +21,6 @@ ifeq ($(strip $(MIDI_ENABLE)), yes) include $(TMK_PATH)/protocol/midi.mk endif -ifeq ($(strip $(BLUETOOTH_ENABLE)), yes) - LUFA_SRC += outputselect.c \ - $(TMK_DIR)/protocol/serial_uart.c -endif - -ifeq ($(strip $(BLUETOOTH)), AdafruitBLE) - LUFA_SRC += spi_master.c \ - analog.c \ - outputselect.c \ - $(LUFA_DIR)/adafruit_ble.cpp -endif - -ifeq ($(strip $(BLUETOOTH)), RN42) - LUFA_SRC += outputselect.c \ - $(TMK_DIR)/protocol/serial_uart.c -endif - ifeq ($(strip $(VIRTSER_ENABLE)), yes) LUFA_SRC += $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/CDCClassDevice.c endif @@ -50,19 +32,10 @@ SRC += $(LUFA_DIR)/usb_util.c VPATH += $(TMK_PATH)/$(LUFA_DIR) VPATH += $(LUFA_PATH) -# Option modules -#ifdef $(or MOUSEKEY_ENABLE, PS2_MOUSE_ENABLE) -#endif - -#ifdef EXTRAKEY_ENABLE -#endif - # LUFA library compile-time options and predefined tokens LUFA_OPTS = -DUSB_DEVICE_ONLY LUFA_OPTS += -DUSE_FLASH_DESCRIPTORS LUFA_OPTS += -DUSE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)" -#LUFA_OPTS += -DINTERRUPT_CONTROL_ENDPOINT -LUFA_OPTS += -DFIXED_CONTROL_ENDPOINT_SIZE=8 LUFA_OPTS += -DFIXED_CONTROL_ENDPOINT_SIZE=8 LUFA_OPTS += -DFIXED_NUM_CONFIGURATIONS=1 diff --git a/users/wanleg/rules.mk b/users/wanleg/rules.mk index eb66a49e6fa231704543179bf1fa343fba195175..410803512d715228ece8e88aa52dd517638bb0b1 100644 --- a/users/wanleg/rules.mk +++ b/users/wanleg/rules.mk @@ -21,8 +21,8 @@ ifeq ($(strip $(BT)), yes) #opt_defs for alternate pin usage OPT_DEFS += -DBLUEFRUIT #Adafruit Bluefruit controller settings - BLUETOOTH = AdafruitBLE BLUETOOTH_ENABLE = yes + BLUETOOTH_DRIVER = AdafruitBLE F_CPU = 8000000 CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = no # Commands for debug and configuration @@ -42,4 +42,4 @@ endif #example usage: make gherkin:wanleg flip=yes ifeq ($(strip $(flip)), yes) OPT_DEFS += -DFLIP -endif \ No newline at end of file +endif