Skip to content

Commit

Permalink
feat(bt/bluedroid): Support to build HID Host and HID Device in singl…
Browse files Browse the repository at this point in the history
…e binary
  • Loading branch information
BetterJincheng committed Nov 1, 2023
1 parent 638d3af commit 1f2a156
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 16 deletions.
23 changes: 11 additions & 12 deletions components/bt/host/bluedroid/Kconfig.in
Original file line number Diff line number Diff line change
Expand Up @@ -124,26 +124,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_BLE_ENABLED
bool "Bluetooth Low Energy"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1f2a156

Please sign in to comment.