Skip to content

Commit

Permalink
Import UART BLE feature as BluefruitLE_UART
Browse files Browse the repository at this point in the history
Related:
- qmk#10674
- qmk#18366
  • Loading branch information
naoki-mizuno committed Mar 4, 2023
1 parent b6242aa commit a214a84
Show file tree
Hide file tree
Showing 7 changed files with 416 additions and 12 deletions.
7 changes: 6 additions & 1 deletion builddefs/common_features.mk
Original file line number Diff line number Diff line change
Expand Up @@ -884,7 +884,7 @@ ifeq ($(strip $(USBPD_ENABLE)), yes)
endif

BLUETOOTH_ENABLE ?= no
VALID_BLUETOOTH_DRIVER_TYPES := BluefruitLE RN42 custom
VALID_BLUETOOTH_DRIVER_TYPES := BluefruitLE BluefruitLE_UART RN42 custom
ifeq ($(strip $(BLUETOOTH_ENABLE)), yes)
ifeq ($(filter $(strip $(BLUETOOTH_DRIVER)),$(VALID_BLUETOOTH_DRIVER_TYPES)),)
$(call CATASTROPHIC_ERROR,Invalid BLUETOOTH_DRIVER,BLUETOOTH_DRIVER="$(BLUETOOTH_DRIVER)" is not a valid Bluetooth driver type)
Expand All @@ -901,6 +901,11 @@ ifeq ($(strip $(BLUETOOTH_ENABLE)), yes)
QUANTUM_LIB_SRC += spi_master.c
endif

ifeq ($(strip $(BLUETOOTH_DRIVER)), BluefruitLE_UART)
OPT_DEFS += -DBLUETOOTH_BLUEFRUIT_LE_UART -DHAL_USE_SERIAL=TRUE
SRC += $(DRIVER_PATH)/bluetooth/bluefruit_le_uart.c
endif

ifeq ($(strip $(BLUETOOTH_DRIVER)), RN42)
OPT_DEFS += -DBLUETOOTH_RN42 -DHAL_USE_SERIAL=TRUE
SRC += $(DRIVER_PATH)/bluetooth/rn42.c
Expand Down
2 changes: 1 addition & 1 deletion data/schemas/keyboard.jsonschema
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
"properties": {
"driver": {
"type": "string",
"enum": ["BluefruitLE", "RN42"]
"enum": ["BluefruitLE", "BluefruitLE_UART", "RN42"]
}
}
},
Expand Down
Loading

0 comments on commit a214a84

Please sign in to comment.