feat(bt/bluedroid): Support to build HID Host and HID Device in single binary

This commit is contained in:
Jin Cheng 2023-10-09 10:12:19 +08:00
parent 8d9035c202
commit 716a47074a
4 changed files with 17 additions and 16 deletions

View File

@ -117,26 +117,25 @@ config BT_HFP_WBS_ENABLE
Otherwise there will be no data transmited via GPIOs.
config BT_HID_ENABLED
menuconfig BT_HID_ENABLED
bool "Classic BT HID"
depends on BT_CLASSIC_ENABLED
default n
help
This enables the BT HID Host
choice BT_HID_ROLE
prompt "Profile Role configuration"
config BT_HID_HOST_ENABLED
bool "Classic BT HID Host"
depends on BT_HID_ENABLED
config BT_HID_HOST_ENABLED
bool "Classic BT HID Host"
help
This enables the BT HID Host
default n
help
This enables the BT HID Host
config BT_HID_DEVICE_ENABLED
bool "Classic BT HID Device"
help
This enables the BT HID Device
endchoice
config BT_HID_DEVICE_ENABLED
bool "Classic BT HID Device"
depends on BT_HID_ENABLED
help
This enables the BT HID Device
config BT_SSP_ENABLED
bool "Secure Simple Pairing"

View File

@ -63,7 +63,7 @@ typedef struct {
/* btc_hidd_args_t */
typedef union {
// BTC_HD_CONNECT_EVT
struct connect_arg {
struct hd_connect_arg {
BD_ADDR bd_addr;
} connect;

View File

@ -103,7 +103,7 @@ typedef struct {
/* btc_spp_args_t */
typedef union {
// BTC_HH_CONNECT_EVT
struct connect_arg {
struct hh_connect_arg {
BD_ADDR bd_addr;
} connect;

View File

@ -454,13 +454,15 @@
#ifdef CONFIG_BT_LOG_HID_TRACE_LEVEL
#if UC_BT_HID_HOST_ENABLED
#define UC_BT_LOG_HIDH_TRACE_LEVEL CONFIG_BT_LOG_HID_TRACE_LEVEL
#elif UC_BT_HID_DEVICE_ENABLED
#endif
#if UC_BT_HID_DEVICE_ENABLED
#define UC_BT_LOG_HIDD_TRACE_LEVEL CONFIG_BT_LOG_HID_TRACE_LEVEL
#endif
#else
#if UC_BT_HID_HOST_ENABLED
#define UC_BT_LOG_HIDH_TRACE_LEVEL UC_TRACE_LEVEL_WARNING
#elif UC_BT_HID_DEVICE_ENABLED
#endif
#if UC_BT_HID_DEVICE_ENABLED
#define UC_BT_LOG_HIDD_TRACE_LEVEL UC_TRACE_LEVEL_WARNING
#endif
#endif