Merge branch 'bugfix/fix_uart_vfs_test_error' into 'master'

bugfix(uart): Don't disable console uart peripheral

See merge request !1456
This commit is contained in:
Angus Gratton 2017-10-27 19:20:13 +08:00
commit 7c9b24b407

View File

@ -1140,6 +1140,7 @@ esp_err_t uart_driver_delete(uart_port_t uart_num)
free(p_uart_obj[uart_num]);
p_uart_obj[uart_num] = NULL;
if (uart_num != CONFIG_CONSOLE_UART_NUM ) {
if(uart_num == UART_NUM_0) {
periph_module_disable(PERIPH_UART0_MODULE);
} else if(uart_num == UART_NUM_1) {
@ -1147,5 +1148,6 @@ esp_err_t uart_driver_delete(uart_port_t uart_num)
} else if(uart_num == UART_NUM_2) {
periph_module_disable(PERIPH_UART2_MODULE);
}
}
return ESP_OK;
}