if hasattr(Pin, "PULL_DOWN"):
                     self._pin.init(mode=Pin.IN, pull=Pin.PULL_DOWN)
                 else:
                 if hasattr(Pin, "PULL_DOWN"):
                     self._pin.init(mode=Pin.IN, pull=Pin.PULL_DOWN)
                 else:
             self._pin.init(mode=Pin.OPEN_DRAIN)
         elif mod is DriveMode.PUSH_PULL:
             self._pin.init(mode=Pin.OUT)
             self._pin.init(mode=Pin.OPEN_DRAIN)
         elif mod is DriveMode.PUSH_PULL:
             self._pin.init(mode=Pin.OUT)