mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +03:00
feat(bt): Add initial support of Bluetooth Classic on ESP32-S31
- feat(soc_caps): Enable BT Classic and BLE in esp32s31 - Add git submodule for ESP32-S31 bt controller lib files - changed sdkconfig.defaults and README for Bluetooth Classic examples - change(docs): Added vendor HCI documentations for ESP32-S31 - change(Bluedroid): Adapt to ESP32-S31 due to some API differences on Bluetooth controller from ESP32 - change(bt): Modify CMakeLists.txt to support the Bluetooth dual-mode architecture on ESP32-S31 - change(bt): Add ECC P-192 functions to tinycrypt
This commit is contained in:
committed by
Wang Mengyang
parent
9c2bde6b64
commit
11268d8bfb
@@ -4522,7 +4522,7 @@ static void bta_dm_set_eir (char *local_name)
|
||||
if (p_bta_dm_eir_cfg->bta_dm_eir_included_tx_power) {
|
||||
if (free_eir_length >= 3) {
|
||||
int min_power_level, max_power_level;
|
||||
#if (BT_CONTROLLER_INCLUDED == TRUE)
|
||||
#if (BR_EDR_GET_EIR_TX_PWR_LEVEL == TRUE)
|
||||
if (esp_bredr_tx_power_get((esp_power_level_t *)&min_power_level, (esp_power_level_t *)&max_power_level) == ESP_OK) {
|
||||
#else
|
||||
{
|
||||
|
||||
@@ -59,6 +59,10 @@ extern tBTA_HF_CLIENT_CB bta_hf_client_cb;
|
||||
#define BTA_HF_CLIENT_INDICATOR_CALLSETUP "callsetup"
|
||||
#define BTA_HF_CLIENT_INDICATOR_CALLHELD "callheld"
|
||||
|
||||
#if defined(MIN)
|
||||
#undef MIN
|
||||
#endif
|
||||
|
||||
#define MIN(a, b) \
|
||||
({ __typeof__(a) _a = (a); __typeof__(b) _b = (b); (_a < _b) ? _a : _b; })
|
||||
|
||||
|
||||
@@ -372,7 +372,7 @@ bt_status_t btc_hf_init(void)
|
||||
clear_phone_state();
|
||||
|
||||
// set audio path
|
||||
#if (BT_CONTROLLER_INCLUDED == TRUE)
|
||||
#if (BR_EDR_SET_CTRL_SCO_DATAPATH == TRUE)
|
||||
#if BTM_SCO_HCI_INCLUDED
|
||||
uint8_t data_path = ESP_SCO_DATA_PATH_HCI;
|
||||
#else
|
||||
|
||||
@@ -201,7 +201,7 @@ bt_status_t btc_hf_client_init(void)
|
||||
|
||||
clear_state();
|
||||
|
||||
#if (BT_CONTROLLER_INCLUDED == TRUE)
|
||||
#if (BR_EDR_SET_CTRL_SCO_DATAPATH == TRUE)
|
||||
#if BTM_SCO_HCI_INCLUDED
|
||||
uint8_t data_path = ESP_SCO_DATA_PATH_HCI;
|
||||
#else
|
||||
|
||||
@@ -1415,6 +1415,19 @@
|
||||
#define BTM_BLE_CONFORMANCE_TESTING FALSE
|
||||
#endif
|
||||
|
||||
#if (CLASSIC_BT_INCLUDED == TRUE)
|
||||
#if (BT_CONTROLLER_INCLUDED == TRUE) && (CONFIG_IDF_TARGET_ESP32)
|
||||
#define BR_EDR_SET_CTRL_SCO_DATAPATH (TRUE)
|
||||
#else
|
||||
#define BR_EDR_SET_CTRL_SCO_DATAPATH (FALSE)
|
||||
#endif
|
||||
|
||||
#if (BT_CONTROLLER_INCLUDED == TRUE) && (CONFIG_IDF_TARGET_ESP32)
|
||||
#define BR_EDR_GET_EIR_TX_PWR_LEVEL (TRUE)
|
||||
#else
|
||||
#define BR_EDR_GET_EIR_TX_PWR_LEVEL (FALSE)
|
||||
#endif
|
||||
#endif
|
||||
/******************************************************************************
|
||||
**
|
||||
** CONTROLLER TO HOST FLOW CONTROL
|
||||
|
||||
Reference in New Issue
Block a user