from adafruit_blinka.microcontroller.mcp2221.pin import Pin
from adafruit_blinka import Enum, ContextManaged
+
class DriveMode(Enum):
PUSH_PULL = None
OPEN_DRAIN = None
class Pull(Enum):
UP = None
DOWN = None
- #NONE=None
+ # NONE=None
Pull.UP = Pull()
Pull.DOWN = Pull()
-#Pull.NONE = Pull()
+# Pull.NONE = Pull()
class DigitalInOut(ContextManaged):
if hasattr(Pin, "PULL_DOWN"):
self._pin.init(mode=Pin.IN, pull=Pin.PULL_DOWN)
else:
- raise NotImplementedError("{} unsupported on {}".format(
- Pull.DOWN, board_id))
+ raise NotImplementedError(
+ "{} unsupported on {}".format(Pull.DOWN, board_id)
+ )
elif pul is None:
self._pin.init(mode=Pin.IN, pull=None)
else: