Good morning.
I am developing an ESP32 code where I use UART communications.
I want to know how can I wait until I have a delimiter on RX data or I wait X time, at the same time,
int uart_read_bytes(uart_port_t uart_num, char* buf, uint32_t length, TickType_t ticks_to_wait) always wait the number of ticks specified and I want to don´t wait more if I have the response.
Does anybody know how to do that?
How to wait UART untill timeout or data readed delimiter
-
- Posts: 8
- Joined: Mon Feb 17, 2020 4:40 pm
Re: How to wait UART untill timeout or data readed delimiter
There is an example in the examples folder for doing just that.
-
- Posts: 8
- Joined: Mon Feb 17, 2020 4:40 pm
Re: How to wait UART untill timeout or data readed delimiter
I hope you find this example helpful.
https://github.com/espressif/esp-idf/tr ... _rxtxtasks
https://github.com/espressif/esp-idf/tr ... _rxtxtasks
Who is online
Users browsing this forum: No registered users and 70 guests