summaryrefslogtreecommitdiff
path: root/shared-bindings/busio
diff options
context:
space:
mode:
authormicroDev <70126934+microDev1@users.noreply.github.com>2021-02-25 00:48:36 +0530
committermicroDev <70126934+microDev1@users.noreply.github.com>2021-02-25 00:48:36 +0530
commit5d7fdafcdec126f4f552689df25cecf30b39265d (patch)
tree104e764d9b7168f77ef97461a855f261724535c2 /shared-bindings/busio
parentb12ccefbe6afd2c8b1743ce7759880ef3b01e9ed (diff)
implement suggested changes
- add internal buffering - rtc initialization fix
Diffstat (limited to 'shared-bindings/busio')
-rw-r--r--shared-bindings/busio/UART.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/shared-bindings/busio/UART.c b/shared-bindings/busio/UART.c
index 151081d31..50d233f2b 100644
--- a/shared-bindings/busio/UART.c
+++ b/shared-bindings/busio/UART.c
@@ -55,7 +55,7 @@
//| :param ~microcontroller.Pin rs485_dir: the output pin for rs485 direction setting, or ``None`` if rs485 not in use.
//| :param bool rs485_invert: rs485_dir pin active high when set. Active low otherwise.
//| :param int baudrate: the transmit and receive speed.
-//| :param int bits: the number of bits per byte, 5 to 8.
+//| :param int bits: the number of bits per byte, 5 to 9.
//| :param Parity parity: the parity used for error checking.
//| :param int stop: the number of stop bits, 1 or 2.
//| :param float timeout: the timeout in seconds to wait for the first character and between subsequent characters when reading. Raises ``ValueError`` if timeout >100 seconds.
@@ -110,8 +110,8 @@ STATIC mp_obj_t busio_uart_make_new(const mp_obj_type_t *type, size_t n_args, co
mp_raise_ValueError(translate("tx and rx cannot both be None"));
}
- if (args[ARG_bits].u_int < 5 || args[ARG_bits].u_int > 8) {
- mp_raise_ValueError(translate("bits must be between 5 and 8"));
+ if (args[ARG_bits].u_int < 5 || args[ARG_bits].u_int > 9) {
+ mp_raise_ValueError(translate("bits must be in range 5 to 9"));
}
uint8_t bits = args[ARG_bits].u_int;