Merge branch 'bugfix/fixed_assert_on_esp32c2_v5.2' into 'release/v5.2'
Some checks failed
docker / docker (push) Has been cancelled

fix(ble): fixed crash issue during deinit host after deinit controller on ESP32-C2 (v5.2)

See merge request espressif/esp-idf!33206
This commit is contained in:
Jiang Jiang Jian 2024-09-05 15:04:13 +08:00
commit da9536dbab

View File

@ -139,6 +139,10 @@ esp_vhci_host_register_callback(const esp_vhci_host_callback_t *callback)
void void
esp_vhci_host_send_packet(uint8_t *data, uint16_t len) esp_vhci_host_send_packet(uint8_t *data, uint16_t len)
{ {
if (esp_bt_controller_get_status() != ESP_BT_CONTROLLER_STATUS_ENABLED) {
return;
}
hci_driver_vhci_tx(data[0], data, len, HCI_DRIVER_DIR_H2C); hci_driver_vhci_tx(data[0], data, len, HCI_DRIVER_DIR_H2C);
} }