You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/firmwareapi/pycom/machine/uart.md
+4-6Lines changed: 4 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -76,23 +76,21 @@ uart.read(5) # read up to 5 bytes
76
76
77
77
Construct a UART object on the given `bus`. `bus` can be `0, 1 or 2`. If the `bus` is not given, the default one will be selected (`0`) or the selection will be made based on the given pins.
78
78
79
-
{{% hint style="danger" %}}
80
-
On the GPy/FiPy UART2 is unavailable because it is used to communicate with the cellular radio.
81
-
{{% /hint %}}
79
+
> On the GPy/FiPy UART2 is unavailable because it is used to communicate with the cellular radio.
Initialise the UART bus with the given parameters:
88
86
89
87
*`baudrate` is the clock rate.
90
88
*`bits` is the number of bits per character. Can be `5, 6, 7 or 8`.
91
89
*`parity` is the parity, `None`, UART.EVEN or UART.ODD.
92
90
*`stop` is the number of stop bits, `1 or 2`.
93
-
*`timeout_chars` Rx timeout defined in number of characters. The value given here will be multiplied by the time a characters takes to be transmitted at the configured `baudrate`.
91
+
*`timeout_chars` Rx timeout defined in number of characters. The value given here will be multiplied by the time a characters takes to be transmitted at the configured `baudrate`. The maximum value is 255
94
92
*`pins` is a 4 or 2 item list indicating the TXD, RXD, RTS and CTS pins (in that order). Any of the pins can be `None` if one wants the UART to operate with limited functionality. If the RTS pin is given the the RX pin must be given as well. The same applies to CTS. When no pins are given, then the default set of TXD (P1) and RXD (P0) pins is taken, and hardware flow control will be disabled. If `pins=None`, no pin assignment will be made.
95
-
*`rx_buffer_size` is the size of the buffer used for storing the RX packets. By default is is 512 bytes.
93
+
*`rx_buffer_size` is the size of the buffer used for storing the RX packets. By default is is 4096 bytes (characters). The minimum buffer size is 128 bytes.
0 commit comments