]> Repositories - Adafruit_Blinka-hackapet.git/blobdiff - src/adafruit_blinka/microcontroller/rp2040_u2if/rp2040_u2if.py
Untangle code and remove pylint disables
[Adafruit_Blinka-hackapet.git] / src / adafruit_blinka / microcontroller / rp2040_u2if / rp2040_u2if.py
index b7acaf0e15ca84429274f6520826eee44af85666..e5198a103800ddab9ad7544573eece547a145495 100644 (file)
@@ -1,3 +1,6 @@
+# SPDX-FileCopyrightText: 2021 Melissa LeBlanc-Williams for Adafruit Industries
+#
+# SPDX-License-Identifier: MIT
 """Helper class for use with RP2040 running u2if firmware"""
 # https://github.com/execuc/u2if
 
 """Helper class for use with RP2040 running u2if firmware"""
 # https://github.com/execuc/u2if
 
@@ -91,6 +94,7 @@ class RP2040_u2if:
 
     def _reset(self):
         self._hid_xfer(bytes([self.SYS_RESET]), False)
 
     def _reset(self):
         self._hid_xfer(bytes([self.SYS_RESET]), False)
+        self._hid.close()
         time.sleep(RP2040_U2IF_RESET_DELAY)
         start = time.monotonic()
         while time.monotonic() - start < 5:
         time.sleep(RP2040_U2IF_RESET_DELAY)
         start = time.monotonic()
         while time.monotonic() - start < 5: