|
|
@@ -1355,8 +1355,6 @@ err:
|
|
|
return r;
|
|
|
}
|
|
|
|
|
|
-int a = 0;
|
|
|
-
|
|
|
//Make sure no other tasks are still using UART before you call this function
|
|
|
esp_err_t uart_driver_delete(uart_port_t uart_num)
|
|
|
{
|
|
|
@@ -1410,6 +1408,11 @@ esp_err_t uart_driver_delete(uart_port_t uart_num)
|
|
|
return ESP_OK;
|
|
|
}
|
|
|
|
|
|
+bool uart_is_driver_installed(uart_port_t uart_num)
|
|
|
+{
|
|
|
+ return uart_num < UART_NUM_MAX && (p_uart_obj[uart_num] != NULL);
|
|
|
+}
|
|
|
+
|
|
|
void uart_set_select_notif_callback(uart_port_t uart_num, uart_select_notif_callback_t uart_select_notif_callback)
|
|
|
{
|
|
|
if (uart_num < UART_NUM_MAX && p_uart_obj[uart_num]) {
|
|
|
@@ -1538,4 +1541,4 @@ esp_err_t uart_set_loop_back(uart_port_t uart_num, bool loop_back_en)
|
|
|
UART_CHECK((uart_num < UART_NUM_MAX), "uart_num error", ESP_ERR_INVALID_ARG);
|
|
|
uart_hal_set_loop_back(&(uart_context[uart_num].hal), loop_back_en);
|
|
|
return ESP_OK;
|
|
|
-}
|
|
|
+}
|