|
1 | 1 | /* |
2 | | - * SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD |
| 2 | + * SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD |
3 | 3 | * |
4 | 4 | * SPDX-License-Identifier: Apache-2.0 |
5 | 5 | */ |
|
24 | 24 | #include "bt_common.h" |
25 | 25 | #include "hci_log/bt_hci_log.h" |
26 | 26 |
|
| 27 | +#if CONFIG_BT_BLE_LOG_SPI_OUT_HCI_ENABLED |
| 28 | +#include "ble_log/ble_log_spi_out.h" |
| 29 | +#endif // CONFIG_BT_BLE_LOG_SPI_OUT_HCI_ENABLED |
| 30 | + |
27 | 31 | #define NIMBLE_VHCI_TIMEOUT_MS 2000 |
28 | 32 | #define BLE_HCI_EVENT_HDR_LEN (2) |
29 | 33 | #define BLE_HCI_CMD_HDR_LEN (3) |
@@ -68,6 +72,9 @@ void esp_vhci_host_send_packet_wrapper(uint8_t *data, uint16_t len) |
68 | 72 | #if (BT_HCI_LOG_INCLUDED == TRUE) |
69 | 73 | bt_hci_log_record_hci_data(data[0], &data[1], len - 1); |
70 | 74 | #endif |
| 75 | +#if (CONFIG_BT_BLE_LOG_SPI_OUT_HCI_ENABLED && !SOC_ESP_NIMBLE_CONTROLLER) |
| 76 | + ble_log_spi_out_write_with_ts(BLE_LOG_SPI_OUT_SOURCE_HCI_DOWNSTREAM, data, len); |
| 77 | +#endif // (CONFIG_BT_BLE_LOG_SPI_OUT_HCI_ENABLED && !SOC_ESP_NIMBLE_CONTROLLER) |
71 | 78 | esp_vhci_host_send_packet(data, len); |
72 | 79 | } |
73 | 80 |
|
@@ -219,6 +226,10 @@ static int dummy_host_rcv_pkt(uint8_t *data, uint16_t len) |
219 | 226 | */ |
220 | 227 | static int host_rcv_pkt(uint8_t *data, uint16_t len) |
221 | 228 | { |
| 229 | +#if (CONFIG_BT_BLE_LOG_SPI_OUT_HCI_ENABLED && !SOC_ESP_NIMBLE_CONTROLLER) |
| 230 | + ble_log_spi_out_write_with_ts(BLE_LOG_SPI_OUT_SOURCE_HCI_UPSTREAM, data, len); |
| 231 | +#endif // (CONFIG_BT_BLE_LOG_SPI_OUT_HCI_ENABLED && !SOC_ESP_NIMBLE_CONTROLLER) |
| 232 | + |
222 | 233 | bt_record_hci_data(data, len); |
223 | 234 |
|
224 | 235 | if(!ble_hs_enabled_state) { |
|
0 commit comments