uart.rst 945 B

12345678910111213141516171819202122232425262728293031323334
  1. UART
  2. ====
  3. Overview
  4. --------
  5. `Instructions`_
  6. .. _Instructions: ../template.html
  7. Application Example
  8. -------------------
  9. Configure uart settings and install uart driver to read/write using UART0 and UART1 interfaces: :example:`peripherals/uart`.
  10. API Reference
  11. -------------
  12. .. include:: /_build/inc/uart.inc
  13. GPIO Lookup Macros
  14. ^^^^^^^^^^^^^^^^^^
  15. Some useful macros can be used to specified the **direct** GPIO (UART module connected to pads through direct IO mux without the GPIO mux) number of a UART channel, or vice versa.
  16. The pin name can be omitted if specify the channel of a GPIO num.
  17. e.g.
  18. 1. ``UART_NUM_2_TXD_DIRECT_GPIO_NUM`` is the GPIO number of UART channel 2 TXD pin (17);
  19. 2. ``UART_GPIO19_DIRECT_CHANNEL`` is the UART channel number of GPIO 19 (channel 0);
  20. 3. ``UART_CTS_GPIO19_DIRECT_CHANNEL`` is the UART channel number of GPIO 19, and GPIO 19 must be a CTS pin (channel 0).
  21. .. include:: /_build/inc/uart_channel.inc