mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/add_dummy_cb_during_deinit_v5.1' into 'release/v5.1'
fix(nimble): De-register host cb in stack deinit (v5.1) See merge request espressif/esp-idf!33375
This commit is contained in:
commit
5ed5ed7be7
@ -190,6 +190,11 @@ static void controller_rcv_pkt_ready(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void dummy_controller_rcv_pkt_ready(void)
|
||||||
|
{
|
||||||
|
/* Dummy function */
|
||||||
|
}
|
||||||
|
|
||||||
void bt_record_hci_data(uint8_t *data, uint16_t len)
|
void bt_record_hci_data(uint8_t *data, uint16_t len)
|
||||||
{
|
{
|
||||||
#if (BT_HCI_LOG_INCLUDED == TRUE)
|
#if (BT_HCI_LOG_INCLUDED == TRUE)
|
||||||
@ -203,6 +208,12 @@ void bt_record_hci_data(uint8_t *data, uint16_t len)
|
|||||||
#endif // (BT_HCI_LOG_INCLUDED == TRUE)
|
#endif // (BT_HCI_LOG_INCLUDED == TRUE)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int dummy_host_rcv_pkt(uint8_t *data, uint16_t len)
|
||||||
|
{
|
||||||
|
/* Dummy function */
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @brief: BT controller callback function, to transfer data packet to the host
|
* @brief: BT controller callback function, to transfer data packet to the host
|
||||||
*/
|
*/
|
||||||
@ -264,6 +275,11 @@ static const esp_vhci_host_callback_t vhci_host_cb = {
|
|||||||
.notify_host_recv = host_rcv_pkt,
|
.notify_host_recv = host_rcv_pkt,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const esp_vhci_host_callback_t dummy_vhci_host_cb = {
|
||||||
|
.notify_host_send_available = dummy_controller_rcv_pkt_ready,
|
||||||
|
.notify_host_recv = dummy_host_rcv_pkt,
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
extern void ble_transport_init(void);
|
extern void ble_transport_init(void);
|
||||||
extern esp_err_t ble_buf_alloc(void);
|
extern esp_err_t ble_buf_alloc(void);
|
||||||
@ -313,6 +329,8 @@ esp_err_t esp_nimble_hci_deinit(void)
|
|||||||
}
|
}
|
||||||
ble_transport_deinit();
|
ble_transport_deinit();
|
||||||
|
|
||||||
|
esp_vhci_host_register_callback(&dummy_vhci_host_cb);
|
||||||
|
|
||||||
ble_buf_free();
|
ble_buf_free();
|
||||||
|
|
||||||
#if MYNEWT_VAL(BLE_QUEUE_CONG_CHECK)
|
#if MYNEWT_VAL(BLE_QUEUE_CONG_CHECK)
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 632513c067a5b8ba2eb34b4d809d694829d712f3
|
Subproject commit 43226b84d1dc9e333b8b3a3c0a69d74612f936ff
|
Loading…
Reference in New Issue
Block a user