summaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2022-02-04 17:55:58 +0000
committerGitHub <noreply@github.com>2022-02-04 09:55:58 -0800
commit8927d5660650878804cf3c7d1a6dee7f3acf5ecf (patch)
tree425ef55e3c71dfe6948128adc9989dd891d58d11 /drivers/bluetooth
parente212c7c2e5f4b0718cb8c10cb11c27661f9ac287 (diff)
Update outputselect to use platform connected state API (#16185)
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r--drivers/bluetooth/outputselect.c13
1 files changed, 2 insertions, 11 deletions
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 <http://www.gnu.org/licenses/>.
*/
#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;
}