Commits

Ben Bass committed 8a50442

fix bitbang error when setting direction

  • Participants
  • Parent commits 7f781c5

Comments (0)

Files changed (1)

pylibftdi/bitbang.py

         if not (0 <= dir <= 255):
             raise FtdiError("invalid direction bitmask")
         self._direction = dir
-        if self.opened:
+        if not self.closed:
             self.ftdi_fn.ftdi_set_bitmode(dir, 0x01)
             self._last_set_dir = dir