split hci log in nimble

This commit is contained in:
zhiweijian
2024-07-08 10:04:22 +08:00
parent 74f81e10d8
commit 9e10a234ab
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -697,7 +697,7 @@ ble_hs_rx_data(struct os_mbuf *om, void *arg)
{
int rc;
#if (BT_HCI_LOG_INCLUDED == TRUE)
#if ((BT_HCI_LOG_INCLUDED == TRUE) && SOC_ESP_NIMBLE_CONTROLLER && CONFIG_BT_CONTROLLER_ENABLED)
uint16_t len = OS_MBUF_PKTHDR(om)->omp_len + 1;
uint8_t *data = (uint8_t *)malloc(len);
assert(data != NULL);
@@ -733,7 +733,7 @@ ble_hs_rx_data(struct os_mbuf *om, void *arg)
int
ble_hs_tx_data(struct os_mbuf *om)
{
#if (BT_HCI_LOG_INCLUDED == TRUE)
#if ((BT_HCI_LOG_INCLUDED == TRUE) && SOC_ESP_NIMBLE_CONTROLLER && CONFIG_BT_CONTROLLER_ENABLED)
uint16_t len = 0;
uint8_t data[MYNEWT_VAL(BLE_TRANSPORT_ACL_SIZE) + 1];
data[0] = 0x02;
+1 -1
View File
@@ -419,7 +419,7 @@ ble_hs_hci_rx_evt(uint8_t *hci_ev, void *arg)
BLE_HS_DBG_ASSERT(hci_ev != NULL);
#if (BT_HCI_LOG_INCLUDED == TRUE)
#if ((BT_HCI_LOG_INCLUDED == TRUE) && SOC_ESP_NIMBLE_CONTROLLER && CONFIG_BT_CONTROLLER_ENABLED)
uint16_t len = hci_ev[1] + 3;
if (host_recv_adv_packet(hci_ev)) {
bt_hci_log_record_hci_adv(HCI_LOG_DATA_TYPE_ADV, &hci_ev[1], len - 2);
+1 -1
View File
@@ -91,7 +91,7 @@ ble_hs_hci_cmd_send(uint16_t opcode, uint8_t len, const void *cmddata)
buf--;
#endif
#if (BT_HCI_LOG_INCLUDED == TRUE)
#if ((BT_HCI_LOG_INCLUDED == TRUE) && SOC_ESP_NIMBLE_CONTROLLER && CONFIG_BT_CONTROLLER_ENABLED)
uint8_t *data;
#if !(SOC_ESP_NIMBLE_CONTROLLER) && CONFIG_BT_CONTROLLER_ENABLED
data = (uint8_t *)buf + 1;