Uart improvments (#571)

* uart: add nr_bits and parity.

Signed-off-by: 0hax <0hax@protonmail.com>

* update param name

* doc as enum

Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
This commit is contained in:
0hax 2020-05-24 23:59:26 +02:00 committed by GitHub
parent 083d7ddd33
commit 5c72d16a14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -46,6 +46,8 @@ Configuration variables:
- **baud_rate** (**Required**, int): The baud rate of the UART bus.
- **tx_pin** (*Optional*, :ref:`config-pin`): The pin to send data to from the ESP's perspective.
- **rx_pin** (*Optional*, :ref:`config-pin`): The pin to receive data on from the ESP's perspective.
- **data_bits** (*Optional*, int): The number of data bits used on the UART bus. Options: 5 to 8. Defaults to 8.
- **parity** (*Optional*): The parity used on the UART bus. Options: ``NONE``, ``EVEN``, ``ODD``. Defaults to ``NONE``.
- **stop_bits** (*Optional*, int): The number of stop bits to send. Options: 1, 2. Defaults to 1.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID for this UART hub if you need multiple UART hubs.