How to wait UART untill timeout or data readed delimiter
Posted: Tue Mar 31, 2020 8:30 am
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?
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?