]> Repositories - Adafruit_Blinka-hackapet.git/blobdiff - src/adafruit_blinka/microcontroller/nxp_lpc4330/uart.py
Update pin.py
[Adafruit_Blinka-hackapet.git] / src / adafruit_blinka / microcontroller / nxp_lpc4330 / uart.py
index b791269653b5e8de28fd7aafc55df7b8296d093e..f2c1c558210f946c43e23274178d1f69cdcf932e 100644 (file)
@@ -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"""