How to get UART_NUM via uart_driver_install

iakihsoug
Posts: 2
Joined: Mon Oct 18, 2021 4:26 am

How to get UART_NUM via uart_driver_install

Postby iakihsoug » Mon Oct 18, 2021 6:31 am

When I use uart_driver_install with two uart like:
uart_driver_install(UART_NUM_0, BUF_SIZE * 2, BUF_SIZE * 2, 20, &uart_queue, 0);
uart_driver_install(UART_NUM_1, BUF_SIZE * 2, BUF_SIZE * 2, 20, &uart_queue, 0);

can I get uart_num in uart_queue?

ESP_Sprite
Posts: 9726
Joined: Thu Nov 26, 2015 4:08 am

Re: How to get UART_NUM via uart_driver_install

Postby ESP_Sprite » Mon Oct 18, 2021 7:47 am

The API is not intended to share a queue, sorry. Better to use two queues.

Who is online

Users browsing this forum: PhilipK and 104 guests