forked from espressif/esp-idf
Merge branch 'feature/include_hf_and_ag_in_single_build_v4.4' into 'release/v4.4'
Feature/include hf and ag in single build v4.4 See merge request espressif/esp-idf!26843
This commit is contained in:
@@ -61,21 +61,23 @@ config BT_SPP_ENABLED
|
|||||||
help
|
help
|
||||||
This enables the Serial Port Profile
|
This enables the Serial Port Profile
|
||||||
|
|
||||||
config BT_HFP_ENABLE
|
menuconfig BT_HFP_ENABLE
|
||||||
bool "Hands Free/Handset Profile"
|
bool "Hands Free/Handset Profile"
|
||||||
depends on BT_CLASSIC_ENABLED
|
depends on BT_CLASSIC_ENABLED
|
||||||
default n
|
default n
|
||||||
|
help
|
||||||
|
Hands Free Unit and Audio Gateway can be included simultaneously
|
||||||
|
but they cannot run simultaneously due to internal limitations.
|
||||||
|
|
||||||
choice BT_HFP_ROLE
|
config BT_HFP_CLIENT_ENABLE
|
||||||
prompt "Hands-free Profile Role configuration"
|
bool "Hands Free Unit"
|
||||||
depends on BT_HFP_ENABLE
|
depends on BT_HFP_ENABLE
|
||||||
|
default y
|
||||||
|
|
||||||
config BT_HFP_CLIENT_ENABLE
|
config BT_HFP_AG_ENABLE
|
||||||
bool "Hands Free Unit"
|
bool "Audio Gateway"
|
||||||
|
depends on BT_HFP_ENABLE
|
||||||
config BT_HFP_AG_ENABLE
|
default y
|
||||||
bool "Audio Gateway"
|
|
||||||
endchoice
|
|
||||||
|
|
||||||
choice BT_HFP_AUDIO_DATA_PATH
|
choice BT_HFP_AUDIO_DATA_PATH
|
||||||
prompt "audio(SCO) data path"
|
prompt "audio(SCO) data path"
|
||||||
@@ -99,26 +101,26 @@ config BT_HFP_WBS_ENABLE
|
|||||||
This enables Wide Band Speech. Should disable it when SCO data path is PCM.
|
This enables Wide Band Speech. Should disable it when SCO data path is PCM.
|
||||||
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"
|
||||||
|
@@ -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;
|
||||||
|
|
||||||
|
@@ -182,13 +182,13 @@ typedef union
|
|||||||
} phone;
|
} phone;
|
||||||
|
|
||||||
// BTC_HF_REGISTER_DATA_CALLBACK_EVT
|
// BTC_HF_REGISTER_DATA_CALLBACK_EVT
|
||||||
struct reg_data_callback {
|
struct ag_reg_data_callback {
|
||||||
esp_hf_incoming_data_cb_t recv;
|
esp_hf_incoming_data_cb_t recv;
|
||||||
esp_hf_outgoing_data_cb_t send;
|
esp_hf_outgoing_data_cb_t send;
|
||||||
} reg_data_cb;
|
} reg_data_cb;
|
||||||
|
|
||||||
// BTC_HF_REQUEST_PKT_STAT_EVT
|
// BTC_HF_REQUEST_PKT_STAT_EVT
|
||||||
struct req_pkt_stat_sync_handle {
|
struct ag_req_pkt_stat_sync_handle {
|
||||||
UINT16 sync_conn_handle;
|
UINT16 sync_conn_handle;
|
||||||
} pkt_sync_hd;
|
} pkt_sync_hd;
|
||||||
|
|
||||||
|
@@ -100,13 +100,13 @@ typedef union {
|
|||||||
} send_dtmf;
|
} send_dtmf;
|
||||||
|
|
||||||
// BTC_HF_CLIENT_REGISTER_DATA_CALLBACK_EVT
|
// BTC_HF_CLIENT_REGISTER_DATA_CALLBACK_EVT
|
||||||
struct reg_data_callback {
|
struct hf_client_reg_data_callback {
|
||||||
esp_hf_client_incoming_data_cb_t recv;
|
esp_hf_client_incoming_data_cb_t recv;
|
||||||
esp_hf_client_outgoing_data_cb_t send;
|
esp_hf_client_outgoing_data_cb_t send;
|
||||||
} reg_data_cb;
|
} reg_data_cb;
|
||||||
|
|
||||||
// BTC_HF_CLIENT_REQUEST_PKT_STAT_EVT
|
// BTC_HF_CLIENT_REQUEST_PKT_STAT_EVT
|
||||||
struct req_pkt_stat_sync_handle {
|
struct hf_client_req_pkt_stat_sync_handle {
|
||||||
UINT16 sync_conn_handle;
|
UINT16 sync_conn_handle;
|
||||||
} pkt_sync_hd;
|
} pkt_sync_hd;
|
||||||
|
|
||||||
|
@@ -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;
|
||||||
|
|
||||||
|
@@ -462,13 +462,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
|
||||||
|
@@ -82,48 +82,50 @@
|
|||||||
#define BTC_SPP_INCLUDED TRUE
|
#define BTC_SPP_INCLUDED TRUE
|
||||||
#endif /* UC_BT_SPP_ENABLED */
|
#endif /* UC_BT_SPP_ENABLED */
|
||||||
|
|
||||||
|
#if (UC_BT_HFP_AG_ENABLED == TRUE) || (UC_BT_HFP_CLIENT_ENABLED == TRUE)
|
||||||
|
#ifndef RFCOMM_INCLUDED
|
||||||
|
#define RFCOMM_INCLUDED TRUE
|
||||||
|
#endif
|
||||||
|
#ifndef BTM_SCO_INCLUDED
|
||||||
|
#define BTM_SCO_INCLUDED TRUE
|
||||||
|
#endif
|
||||||
|
#ifndef SBC_DEC_INCLUDED
|
||||||
|
#define SBC_DEC_INCLUDED TRUE
|
||||||
|
#endif
|
||||||
|
#ifndef SBC_ENC_INCLUDED
|
||||||
|
#define SBC_ENC_INCLUDED TRUE
|
||||||
|
#endif
|
||||||
|
#ifndef PLC_INCLUDED
|
||||||
|
#define PLC_INCLUDED TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
#if (UC_BT_HFP_AG_ENABLED == TRUE)
|
#if (UC_BT_HFP_AG_ENABLED == TRUE)
|
||||||
|
#ifndef BTM_MAX_SCO_LINKS_AG
|
||||||
|
#define BTM_MAX_SCO_LINKS_AG (1)
|
||||||
|
#endif
|
||||||
#define BTC_HF_INCLUDED TRUE
|
#define BTC_HF_INCLUDED TRUE
|
||||||
#define BTA_AG_INCLUDED TRUE
|
#define BTA_AG_INCLUDED TRUE
|
||||||
#define PLC_INCLUDED TRUE
|
#else
|
||||||
#ifndef RFCOMM_INCLUDED
|
#ifndef BTM_MAX_SCO_LINKS_AG
|
||||||
#define RFCOMM_INCLUDED TRUE
|
#define BTM_MAX_SCO_LINKS_AG (0)
|
||||||
#endif
|
#endif
|
||||||
#ifndef BTM_SCO_INCLUDED
|
#endif /* (UC_BT_HFP_AG_ENABLED == TRUE) */
|
||||||
#define BTM_SCO_INCLUDED TRUE
|
|
||||||
#endif
|
|
||||||
#ifndef BTM_MAX_SCO_LINKS
|
|
||||||
#define BTM_MAX_SCO_LINKS (1)
|
|
||||||
#endif
|
|
||||||
#ifndef SBC_DEC_INCLUDED
|
|
||||||
#define SBC_DEC_INCLUDED TRUE
|
|
||||||
#endif
|
|
||||||
#ifndef SBC_ENC_INCLUDED
|
|
||||||
#define SBC_ENC_INCLUDED TRUE
|
|
||||||
#endif
|
|
||||||
#endif /* UC_BT_HFP_AG_ENABLED */
|
|
||||||
|
|
||||||
#if (UC_BT_HFP_CLIENT_ENABLED == TRUE)
|
#if (UC_BT_HFP_CLIENT_ENABLED == TRUE)
|
||||||
|
#ifndef BTM_MAX_SCO_LINKS_CLIENT
|
||||||
|
#define BTM_MAX_SCO_LINKS_CLIENT (1)
|
||||||
|
#endif
|
||||||
#define BTC_HF_CLIENT_INCLUDED TRUE
|
#define BTC_HF_CLIENT_INCLUDED TRUE
|
||||||
#define BTA_HF_INCLUDED TRUE
|
#define BTA_HF_INCLUDED TRUE
|
||||||
#define PLC_INCLUDED TRUE
|
#else
|
||||||
#ifndef RFCOMM_INCLUDED
|
#ifndef BTM_MAX_SCO_LINKS_CLIENT
|
||||||
#define RFCOMM_INCLUDED TRUE
|
#define BTM_MAX_SCO_LINKS_CLIENT (0)
|
||||||
#endif
|
|
||||||
#ifndef BTM_SCO_INCLUDED
|
|
||||||
#define BTM_SCO_INCLUDED TRUE
|
|
||||||
#endif
|
|
||||||
#ifndef BTM_MAX_SCO_LINKS
|
|
||||||
#define BTM_MAX_SCO_LINKS (1)
|
|
||||||
#endif
|
#endif
|
||||||
|
#endif /* (UC_BT_HFP_CLIENT_ENABLED == TRUE) */
|
||||||
|
|
||||||
#ifndef SBC_DEC_INCLUDED
|
#ifndef BTM_MAX_SCO_LINKS
|
||||||
#define SBC_DEC_INCLUDED TRUE
|
#define BTM_MAX_SCO_LINKS (BTM_MAX_SCO_LINKS_AG + BTM_MAX_SCO_LINKS_CLIENT)
|
||||||
#endif
|
#endif
|
||||||
#ifndef SBC_ENC_INCLUDED
|
#endif /* (UC_BT_HFP_AG_ENABLED == TRUE) || (UC_BT_HFP_CLIENT_ENABLED == TRUE) */
|
||||||
#define SBC_ENC_INCLUDED TRUE
|
|
||||||
#endif
|
|
||||||
#endif /* UC_BT_HFP_CLIENT_ENABLED */
|
|
||||||
|
|
||||||
#if UC_BT_SSP_ENABLED
|
#if UC_BT_SSP_ENABLED
|
||||||
#define BT_SSP_INCLUDED TRUE
|
#define BT_SSP_INCLUDED TRUE
|
||||||
|
Reference in New Issue
Block a user