feat(Adafruit BLE UART): add definition for build

This commit is contained in:
Naoki Mizuno 2023-11-18 14:28:48 +09:00 committed by orumin
parent 6d03a16d50
commit 794a02cd2d
2 changed files with 9 additions and 2 deletions

View File

@ -872,7 +872,7 @@ ifeq ($(strip $(USBPD_ENABLE)), yes)
endif
BLUETOOTH_ENABLE ?= no
VALID_BLUETOOTH_DRIVER_TYPES := bluefruit_le custom rn42
VALID_BLUETOOTH_DRIVER_TYPES := bluefruit_le bluefruit_le_uart custom rn42
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)
@ -890,6 +890,13 @@ ifeq ($(strip $(BLUETOOTH_ENABLE)), yes)
SRC += $(DRIVER_PATH)/bluetooth/bluefruit_le.cpp
endif
ifeq ($(strip $(BLUETOOTH_DRIVER)), bluefruit_le_uart)
OPT_DEFS += -DBLUETOOTH_BLUEFRUIT_LE_UART -DHAL_USE_SERIAL=TRUE
SRC += $(DRIVER_PATH)/bluetooth/bluetooth.c
SRC += $(DRIVER_PATH)/bluetooth/bluefruit_le_uart.c
QUANTUM_LIB_SRC += uart.c
endif
ifeq ($(strip $(BLUETOOTH_DRIVER)), rn42)
UART_DRIVER_REQUIRED = yes
SRC += $(DRIVER_PATH)/bluetooth/bluetooth.c

View File

@ -165,7 +165,7 @@
"properties": {
"driver": {
"type": "string",
"enum": ["bluefruit_le", "custom", "rn42"]
"enum": ["bluefruit_le", "bluefruit_le_uart", "custom", "rn42"]
}
}
},