From 7d685956cc616a8d76aa7866f42bf569a9ca3fca Mon Sep 17 00:00:00 2001 From: Ryan Date: Mon, 31 Jan 2022 04:29:42 +1100 Subject: Rename `AdafruitBLE` to `BluefruitLE` (#16127) --- drivers/bluetooth/outputselect.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers/bluetooth/outputselect.c') diff --git a/drivers/bluetooth/outputselect.c b/drivers/bluetooth/outputselect.c index f758c65280..cdd2e64cfd 100644 --- a/drivers/bluetooth/outputselect.c +++ b/drivers/bluetooth/outputselect.c @@ -18,8 +18,8 @@ along with this program. If not, see . # include "lufa.h" #endif -#ifdef MODULE_ADAFRUIT_BLE -# include "adafruit_ble.h" +#ifdef BLUETOOTH_BLUEFRUIT_LE +# include "bluefruit_le.h" #endif uint8_t desired_output = OUTPUT_DEFAULT; @@ -54,8 +54,8 @@ uint8_t auto_detect_output(void) { return OUTPUT_USB; } -#ifdef MODULE_ADAFRUIT_BLE - if (adafruit_ble_is_connected()) { +#ifdef BLUETOOTH_BLUEFRUIT_LE + if (bluefruit_le_is_connected()) { return OUTPUT_BLUETOOTH; } #endif -- cgit v1.2.3 From 8927d5660650878804cf3c7d1a6dee7f3acf5ecf Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Fri, 4 Feb 2022 17:55:58 +0000 Subject: Update outputselect to use platform connected state API (#16185) --- drivers/bluetooth/outputselect.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'drivers/bluetooth/outputselect.c') diff --git a/drivers/bluetooth/outputselect.c b/drivers/bluetooth/outputselect.c index cdd2e64cfd..44bc4a9aa3 100644 --- a/drivers/bluetooth/outputselect.c +++ b/drivers/bluetooth/outputselect.c @@ -13,10 +13,7 @@ along with this program. If not, see . */ #include "outputselect.h" - -#if defined(PROTOCOL_LUFA) -# include "lufa.h" -#endif +#include "usb_util.h" #ifdef BLUETOOTH_BLUEFRUIT_LE # include "bluefruit_le.h" @@ -39,18 +36,12 @@ void set_output(uint8_t output) { */ __attribute__((weak)) void set_output_user(uint8_t output) {} -static bool is_usb_configured(void) { -#if defined(PROTOCOL_LUFA) - return USB_DeviceState == DEVICE_STATE_Configured; -#endif -} - /** \brief Auto Detect Output * * FIXME: Needs doc */ uint8_t auto_detect_output(void) { - if (is_usb_configured()) { + if (usb_connected_state()) { return OUTPUT_USB; } -- cgit v1.2.3 From 63646e8906e062d1c1de3925cba70c4e3426a855 Mon Sep 17 00:00:00 2001 From: QMK Bot Date: Sat, 12 Feb 2022 10:29:31 -0800 Subject: Format code according to conventions (#16322) --- drivers/bluetooth/outputselect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/bluetooth/outputselect.c') diff --git a/drivers/bluetooth/outputselect.c b/drivers/bluetooth/outputselect.c index 44bc4a9aa3..b986ba274e 100644 --- a/drivers/bluetooth/outputselect.c +++ b/drivers/bluetooth/outputselect.c @@ -52,7 +52,7 @@ uint8_t auto_detect_output(void) { #endif #ifdef BLUETOOTH_ENABLE - return OUTPUT_BLUETOOTH; // should check if BT is connected here + return OUTPUT_BLUETOOTH; // should check if BT is connected here #endif return OUTPUT_NONE; -- cgit v1.2.3