Bind Bluetooth driver to host_driver_t (#25199)

This commit is contained in:
Joel Challis 2025-05-05 04:05:04 +01:00 committed by GitHub
parent 614b631ee2
commit 842c840145
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 174 additions and 93 deletions

View file

@ -5,6 +5,10 @@
#include "usb_util.h"
#include "util.h"
#ifdef BLUETOOTH_ENABLE
# include "bluetooth.h"
#endif
// ======== DEPRECATED DEFINES - DO NOT USE ========
#ifdef OUTPUT_DEFAULT
# undef CONNECTION_HOST_DEFAULT
@ -14,16 +18,6 @@
__attribute__((weak)) void set_output_user(uint8_t output) {}
// ========
#ifdef BLUETOOTH_ENABLE
# ifdef BLUETOOTH_BLUEFRUIT_LE
# include "bluefruit_le.h"
# define bluetooth_is_connected() bluefruit_le_is_connected()
# else
// TODO: drivers should check if BT is connected here
# define bluetooth_is_connected() true
# endif
#endif
#define CONNECTION_HOST_INVALID 0xFF
#ifndef CONNECTION_HOST_DEFAULT