mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
fix(nimble): De-register host cb in stack deinit
This commit is contained in:
parent
afc8010c0a
commit
07f668be14
@ -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)
|
||||
{
|
||||
#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)
|
||||
}
|
||||
|
||||
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
|
||||
*/
|
||||
@ -264,6 +275,11 @@ static const esp_vhci_host_callback_t vhci_host_cb = {
|
||||
.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 esp_err_t ble_buf_alloc(void);
|
||||
@ -313,6 +329,8 @@ esp_err_t esp_nimble_hci_deinit(void)
|
||||
}
|
||||
ble_transport_deinit();
|
||||
|
||||
esp_vhci_host_register_callback(&dummy_vhci_host_cb);
|
||||
|
||||
ble_buf_free();
|
||||
|
||||
#if MYNEWT_VAL(BLE_QUEUE_CONG_CHECK)
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 632513c067a5b8ba2eb34b4d809d694829d712f3
|
||||
Subproject commit 43226b84d1dc9e333b8b3a3c0a69d74612f936ff
|
Loading…
Reference in New Issue
Block a user