mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Fixed task watchdog trigger issue when closed hci uart
This commit is contained in:
parent
6b0a64d722
commit
a68fad98ed
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@ -176,9 +176,12 @@ int hci_uart_init_cbs(int port_num, hci_uart_tx_char tx_func,
|
||||
|
||||
int hci_uart_close(int port_num)
|
||||
{
|
||||
uart_event_t uart_event;
|
||||
uart_event.type = UART_BREAK;
|
||||
hci_uart.uart_opened = false;
|
||||
// Stop uart rx task
|
||||
if (hci_uart.rx_task_handler != NULL) {
|
||||
xQueueSend(hci_uart.evt_queue, (void *)&uart_event, 1000);
|
||||
ESP_LOGW(TAG, "Waiting for uart task finish...");
|
||||
}
|
||||
while (hci_uart.rx_task_handler != NULL);
|
||||
|
Loading…
x
Reference in New Issue
Block a user