mirror of
https://github.com/espressif/esp-idf
synced 2025-03-09 17:19:09 -04:00
Merge branch 'contrib/github_pr_7872' into 'master'
QA: Check driver installation status (GitHub PR) Closes IDFGH-6196 See merge request espressif/esp-idf!16630
This commit is contained in:
commit
198fd08fb3
@ -22,6 +22,11 @@ static const char* TAG = "uart_select_example";
|
||||
|
||||
static void uart_select_task(void *arg)
|
||||
{
|
||||
if (uart_driver_install(UART_NUM_0, 2*1024, 0, 0, NULL, 0) != ESP_OK) {
|
||||
ESP_LOGE(TAG, "Driver installation failed");
|
||||
vTaskDelete(NULL);
|
||||
}
|
||||
|
||||
uart_config_t uart_config = {
|
||||
.baud_rate = 115200,
|
||||
.data_bits = UART_DATA_8_BITS,
|
||||
@ -30,7 +35,7 @@ static void uart_select_task(void *arg)
|
||||
.flow_ctrl = UART_HW_FLOWCTRL_DISABLE,
|
||||
.source_clk = UART_SCLK_DEFAULT,
|
||||
};
|
||||
uart_driver_install(UART_NUM_0, 2*1024, 0, 0, NULL, 0);
|
||||
|
||||
uart_param_config(UART_NUM_0, &uart_config);
|
||||
|
||||
while (1) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user