summaryrefslogtreecommitdiffstatshomepage
path: root/tests/pyb/pin.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pyb/pin.py')
-rw-r--r--tests/pyb/pin.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/pyb/pin.py b/tests/pyb/pin.py
index 448ce53998..b3eb87b608 100644
--- a/tests/pyb/pin.py
+++ b/tests/pyb/pin.py
@@ -1,17 +1,21 @@
from pyb import Pin
-p = Pin('X1')
+p = Pin('X1', Pin.IN)
print(p)
print(p.name())
print(p.pin())
print(p.port())
p = Pin('X1', Pin.IN, Pin.PULL_UP)
-#p = Pin('X1', Pin.IN, pull=Pin.PULL_UP)
+p = Pin('X1', Pin.IN, pull=Pin.PULL_UP)
+p = Pin('X1', mode=Pin.IN, pull=Pin.PULL_UP)
+print(p)
print(p.value())
p.init(p.IN, p.PULL_DOWN)
-#p.init(p.IN, pull=p.PULL_DOWN)
+p.init(p.IN, pull=p.PULL_DOWN)
+p.init(mode=p.IN, pull=p.PULL_DOWN)
+print(p)
print(p.value())
p.init(p.OUT_PP)