docs: Add extra clarification on use of uart pattern detection.

Closes https://github.com/espressif/esp-idf/issues/4187
This commit is contained in:
Krzysztof Budzynski 2019-10-29 16:55:49 +08:00
parent dc5a7c85ff
commit 14ed4800d1

View File

@ -169,7 +169,8 @@ The API provides a convenient way to handle specific interrupts discussed above
* **FIFO space threshold or transmission timeout reached** - the interrupts on TX or Rx FIFO buffer being filled with specific number of characters or on a timeout of sending or receiving data. To use these interrupts, first configure respective threshold values of the buffer length and the timeout by entering them in :cpp:type:`uart_intr_config_t` structure and calling :cpp:func:`uart_intr_config`. Then enable interrupts with functions :cpp:func:`uart_enable_rx_intr` and :cpp:func:`uart_enable_tx_intr`. To disable these interrupts there are corresponding functions :cpp:func:`uart_disable_rx_intr` or :cpp:func:`uart_disable_tx_intr`.
* **Pattern detection** - an interrupt triggered on detecting a 'pattern' of the same character being sent number of times. The functions that allow to configure, enable and disable this interrupt are :cpp:func:`uart_enable_pattern_det_baud_intr` and cpp:func:`uart_disable_pattern_det_intr`.
* **Pattern detection** - an interrupt triggered on detecting a 'pattern' of the same character being received/sent repeatedly for a number of times. This functionality is demonstrated in :example:`peripherals/uart/uart_events` example. It may be used e.g. to detect a command string followed by specific number of identical characters (the 'pattern') added at the end of the command string. The functions that allow to configure, enable and disable this interrupt are :cpp:func:`uart_enable_pattern_det_intr` and :cpp:func:`uart_disable_pattern_det_intr`.
Macros
^^^^^^
@ -279,9 +280,9 @@ Application Examples
Configure UART settings and install UART driver to read/write using UART1 interface: :example:`peripherals/uart/uart_echo`.
Demonstration of how to report various communication events and how to use patern detection interrupts: :example:`peripherals/uart/uart_events`.
Demonstration of how to report various communication events and how to use pattern detection interrupts: :example:`peripherals/uart/uart_events`.
Transmitting and receiveing with the same UART in two separate FreeRTOS tasks: :example:`peripherals/uart/uart_async_rxtxtasks`.
Transmitting and receiving with the same UART in two separate FreeRTOS tasks: :example:`peripherals/uart/uart_async_rxtxtasks`.
Using synchronous I/O multiplexing for UART file descriptors: :example:`peripherals/uart/uart_select`.