]> granicus.if.org Git - esp-idf/commit
bugfix(uart): patten detect function
authorWangjialin <wangjialin@espressif.com>
Fri, 25 Aug 2017 13:04:13 +0000 (21:04 +0800)
committerWangjialin <wangjialin@espressif.com>
Mon, 22 Jan 2018 05:33:51 +0000 (13:33 +0800)
commit870efdb9d41f484a832718cf678eff1f9bcfd18b
tree6f1fac413265113bc602cc656a07d7bce0ae91eb
parentf482e9e54ce83e249e46f5ee082f6ffb61431339
bugfix(uart): patten detect function

requirement from github(https://github.com/espressif/esp-idf/issues/805): to provide the position in the buffer of the pattern detected.

requirement from AT application: in AT app, when no hardware flow control is enabled, in some situation the rx buffer might be full, and the terminator “+++” might be lost, we can use pattern detect interrupt to avoid missing the terminator. When pattern detect interrupt happens, it will not send a data event at the same time.

1. Add API to get position of detected pattern in rx buffer
2. Modify UART event example
3. Add comments for uart_flush, add alias API uart_flush_input to clear the rx buffer
4. Modify the way rx_buffered_len is calculated
components/driver/include/driver/uart.h
components/driver/uart.c
examples/peripherals/uart_events/main/uart_events_example_main.c