mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +03:00
fix(ble): Fixed AI review bugs in bt common
This commit is contained in:
@@ -68,7 +68,9 @@ bool hci_host_check_send_available(void)
|
||||
void hci_host_send_packet(uint8_t *data, uint16_t len)
|
||||
{
|
||||
#if (BT_HCI_LOG_INCLUDED == TRUE)
|
||||
bt_hci_log_record_hci_data(data[0], &data[1], len - 1);
|
||||
if (data != NULL && len > 1) {
|
||||
bt_hci_log_record_hci_data(data[0], &data[1], (uint16_t)(len - 1));
|
||||
}
|
||||
#endif
|
||||
#if CONFIG_BT_BLE_LOG_SPI_OUT_HCI_ENABLED
|
||||
ble_log_spi_out_hci_write(BLE_LOG_SPI_OUT_SOURCE_HCI_DOWNSTREAM, data, len);
|
||||
|
||||
@@ -227,7 +227,9 @@ esp_err_t esp_bluedroid_init_with_cfg(esp_bluedroid_config_t *cfg)
|
||||
}
|
||||
|
||||
#if (BT_HCI_LOG_INCLUDED == TRUE)
|
||||
bt_hci_log_init();
|
||||
if (bt_hci_log_init() != ESP_OK) {
|
||||
LOG_WARN("HCI log facility unavailable, continuing without HCI log\n");
|
||||
}
|
||||
#endif // (BT_HCI_LOG_INCLUDED == TRUE)
|
||||
|
||||
s_bt_host_state = ESP_BLUEDROID_STATUS_INITIALIZED;
|
||||
|
||||
Reference in New Issue
Block a user