X-Git-Url: https://git.ayoreis.com/Adafruit_Blinka-hackapet.git/blobdiff_plain/98f4a4378478d11e514acd7ff22a9c674f3cbca3..0a5ff29100196bd9a41bf6deee6c46e65f3ff3d5:/src/adafruit_blinka/microcontroller/nxp_lpc4330/uart.py diff --git a/src/adafruit_blinka/microcontroller/nxp_lpc4330/uart.py b/src/adafruit_blinka/microcontroller/nxp_lpc4330/uart.py index b791269..f2c1c55 100644 --- a/src/adafruit_blinka/microcontroller/nxp_lpc4330/uart.py +++ b/src/adafruit_blinka/microcontroller/nxp_lpc4330/uart.py @@ -1,17 +1,21 @@ +# SPDX-FileCopyrightText: 2021 Melissa LeBlanc-Williams for Adafruit Industries +# +# SPDX-License-Identifier: MIT """UART Class for NXP LPC4330""" from greatfet import GreatFET from greatfet.interfaces.uart import UART as _UART + class UART: """Custom UART Class for NXP LPC4330""" - PARITY_NONE = 0 - PARITY_ODD = 1 - PARITY_EVEN = 2 - PARITY_STUCK_AT_ONE = 3 + PARITY_NONE = 0 + PARITY_ODD = 1 + PARITY_EVEN = 2 + PARITY_STUCK_AT_ONE = 3 PARITY_STUCK_AT_ZERO = 4 - # pylint: disable=too-many-arguments + # pylint: disable=too-many-arguments,unused-argument def __init__( self, portid, @@ -24,14 +28,21 @@ class UART: flow=None, ): self._gf = GreatFET() - self._uart = _UART(self._gf, baud=baudrate, data_bits=bits, stop_bits=stop, parity=parity, uart_number=portid) - + self._uart = _UART( + self._gf, + baud=baudrate, + data_bits=bits, + stop_bits=stop, + parity=parity, + uart_number=portid, + ) + if flow is not None: # default None raise NotImplementedError( "Parameter '{}' unsupported on GreatFET One".format("flow") ) - # pylint: enable=too-many-arguments + # pylint: enable=too-many-arguments,unused-argument def deinit(self): """Deinitialize"""