From 5d7fdafcdec126f4f552689df25cecf30b39265d Mon Sep 17 00:00:00 2001 From: microDev <70126934+microDev1@users.noreply.github.com> Date: Thu, 25 Feb 2021 00:48:36 +0530 Subject: implement suggested changes - add internal buffering - rtc initialization fix --- shared-bindings/busio/UART.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'shared-bindings') 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; -- cgit v1.2.3