Skip to content

Commit 91f09f9

Browse files
committed
digitalio: Enable Pull.DOWN mode
1 parent ea5e445 commit 91f09f9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

adafruit_seesaw/digitalio.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def switch_to_output(self, value=False, drive_mode=digitalio.DriveMode.PUSH_PULL
4646

4747
def switch_to_input(self, pull=None):
4848
if pull == digitalio.Pull.DOWN:
49-
raise ValueError("Pull Down currently not supported")
49+
self._seesaw.pin_mode(self._pin, self._seesaw.INPUT_PULLDOWN)
5050
elif pull == digitalio.Pull.UP:
5151
self._seesaw.pin_mode(self._pin, self._seesaw.INPUT_PULLUP)
5252
else:
@@ -97,7 +97,7 @@ def pull(self, mode):
9797
if self._direction == digitalio.Direction.OUTPUT:
9898
raise AttributeError("cannot set pull on an output pin")
9999
elif mode == digitalio.Pull.DOWN:
100-
raise ValueError("Pull Down currently not supported")
100+
self._seesaw.pin_mode(self._pin, self._seesaw.INPUT_PULLDOWN)
101101
elif mode == digitalio.Pull.UP:
102102
self._seesaw.pin_mode(self._pin, self._seesaw.INPUT_PULLUP)
103103
elif mode is None:

0 commit comments

Comments
 (0)