feat(ble): supported ble log v2 hci log for NimBLE host
This commit is contained in:
@@ -27,6 +27,9 @@
|
||||
#if CONFIG_BT_BLE_LOG_SPI_OUT_HCI_ENABLED
|
||||
#include "ble_log/ble_log_spi_out.h"
|
||||
#endif // CONFIG_BT_BLE_LOG_SPI_OUT_HCI_ENABLED
|
||||
#if CONFIG_BLE_LOG_ENABLED
|
||||
#include "ble_log.h"
|
||||
#endif /* CONFIG_BLE_LOG_ENABLED */
|
||||
|
||||
#define NIMBLE_VHCI_TIMEOUT_MS 2000
|
||||
#define BLE_HCI_EVENT_HDR_LEN (2)
|
||||
@@ -80,6 +83,9 @@ void esp_vhci_host_send_packet_wrapper(uint8_t *data, uint16_t len)
|
||||
#if CONFIG_BT_BLE_LOG_SPI_OUT_HCI_ENABLED
|
||||
ble_log_spi_out_hci_write(BLE_LOG_SPI_OUT_SOURCE_HCI_DOWNSTREAM, data, len);
|
||||
#endif // CONFIG_BT_BLE_LOG_SPI_OUT_HCI_ENABLED
|
||||
#if CONFIG_BLE_LOG_ENABLED
|
||||
ble_log_write_hex(BLE_LOG_SRC_HCI, data, len);
|
||||
#endif /* CONFIG_BLE_LOG_ENABLED */
|
||||
esp_vhci_host_send_packet(data, len);
|
||||
}
|
||||
|
||||
@@ -260,6 +266,9 @@ static int host_rcv_pkt(uint8_t *data, uint16_t len)
|
||||
#if CONFIG_BT_BLE_LOG_SPI_OUT_HCI_ENABLED
|
||||
ble_log_spi_out_hci_write(BLE_LOG_SPI_OUT_SOURCE_HCI_UPSTREAM, data, len);
|
||||
#endif // CONFIG_BT_BLE_LOG_SPI_OUT_HCI_ENABLED
|
||||
#if CONFIG_BLE_LOG_ENABLED
|
||||
ble_log_write_hex(BLE_LOG_SRC_HCI, data, len);
|
||||
#endif /* CONFIG_BLE_LOG_ENABLED */
|
||||
|
||||
bt_record_hci_data(data, len);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user