#Pull.NONE = Pull()
+
class DigitalInOut(ContextManaged):
_pin = None
del self._pin
def cleanup(self, channel=None):
- Pin.cleanup(self, channel)
+ if channel == self:
+ Pin.cleanup(self._pin, self._pin)
+ else:
+ Pin.cleanup(self, channel)
@property
def direction(self):