mirror of
https://github.com/espressif/esp-idf
synced 2025-03-09 17:19:09 -04:00
Merge branch 'feat/support_enable_ble_hci_log_by_api_v5.0' into 'release/v5.0'
feat(ble/bluedroid): Support enable BLE hci log by API (v5.0) See merge request espressif/esp-idf!34421
This commit is contained in:
commit
90155fa324
@ -305,19 +305,27 @@ void bt_hci_log_data_show(bt_hci_log_t *p_hci_log_ctl)
|
||||
|
||||
osi_mutex_unlock(&mutex_lock);
|
||||
}
|
||||
static bool enable_hci_log_flag = true;
|
||||
void bt_hci_log_record_hci_enable(bool enable)
|
||||
{
|
||||
enable_hci_log_flag = enable;
|
||||
}
|
||||
|
||||
esp_err_t IRAM_ATTR bt_hci_log_record_hci_data(uint8_t data_type, uint8_t *data, uint8_t data_len)
|
||||
{
|
||||
if (!enable_hci_log_flag) return ESP_OK;
|
||||
return bt_hci_log_record_data(&g_bt_hci_log_data_ctl, NULL, data_type, data, data_len);
|
||||
}
|
||||
|
||||
esp_err_t IRAM_ATTR bt_hci_log_record_custom_data(char *string, uint8_t *data, uint8_t data_len)
|
||||
{
|
||||
if (!enable_hci_log_flag) return ESP_OK;
|
||||
return bt_hci_log_record_data(&g_bt_hci_log_data_ctl, string, HCI_LOG_DATA_TYPE_SELF_DEFINE, data, data_len);
|
||||
}
|
||||
|
||||
esp_err_t IRAM_ATTR bt_hci_log_record_hci_adv(uint8_t data_type, uint8_t *data, uint8_t data_len)
|
||||
{
|
||||
if (!enable_hci_log_flag) return ESP_OK;
|
||||
return bt_hci_log_record_data(&g_bt_hci_log_adv_ctl, NULL, data_type, data, data_len);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user