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. Otherwise there will be no data transmited via GPIOs.
config BT_HID_ENABLED menuconfig BT_HID_ENABLED
bool "Classic BT HID" bool "Classic BT HID"
depends on BT_CLASSIC_ENABLED depends on BT_CLASSIC_ENABLED
default n default n
help help
This enables the BT HID Host This enables the BT HID Host
choice BT_HID_ROLE config BT_HID_HOST_ENABLED
prompt "Profile Role configuration" bool "Classic BT HID Host"
depends on BT_HID_ENABLED depends on BT_HID_ENABLED
config BT_HID_HOST_ENABLED default n
bool "Classic BT HID Host" help
help This enables the BT HID Host
This enables the BT HID Host
config BT_HID_DEVICE_ENABLED config BT_HID_DEVICE_ENABLED
bool "Classic BT HID Device" bool "Classic BT HID Device"
help depends on BT_HID_ENABLED
This enables the BT HID Device help
endchoice This enables the BT HID Device
config BT_SSP_ENABLED config BT_SSP_ENABLED
bool "Secure Simple Pairing" bool "Secure Simple Pairing"

View File

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

View File

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

View File

@ -454,13 +454,15 @@
#ifdef CONFIG_BT_LOG_HID_TRACE_LEVEL #ifdef CONFIG_BT_LOG_HID_TRACE_LEVEL
#if UC_BT_HID_HOST_ENABLED #if UC_BT_HID_HOST_ENABLED
#define UC_BT_LOG_HIDH_TRACE_LEVEL CONFIG_BT_LOG_HID_TRACE_LEVEL #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 #define UC_BT_LOG_HIDD_TRACE_LEVEL CONFIG_BT_LOG_HID_TRACE_LEVEL
#endif #endif
#else #else
#if UC_BT_HID_HOST_ENABLED #if UC_BT_HID_HOST_ENABLED
#define UC_BT_LOG_HIDH_TRACE_LEVEL UC_TRACE_LEVEL_WARNING #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 #define UC_BT_LOG_HIDD_TRACE_LEVEL UC_TRACE_LEVEL_WARNING
#endif #endif
#endif #endif