Skip to content

Commit 47f5eb2

Browse files
author
Adam Patt
committed
changed signature and docstring
1 parent b40cdbc commit 47f5eb2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

simpleio.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,9 @@ class DigitalOut:
232232
"""
233233
def __init__(self, pin, value=None, drive_mode=None):
234234
"""
235-
value and drive_mode: if passed in will be passed to switch_to_output
236-
see digitalio.DigitalInOut.switch_to_output for more details
235+
kwargs will be passed directly to switch_to_output
236+
value (bool): default value to set upon switching
237+
drive_mode (DriveMode): drive mode for the output
237238
"""
238239
kwargs = {k: v for k, v in (('value', value), ('drive_mode', drive_mode)) if not v is None}
239240
self.iopin = digitalio.DigitalInOut(pin)
@@ -252,12 +253,11 @@ class DigitalIn:
252253
"""
253254
Simple digital input that is valid until soft reset.
254255
"""
255-
def __init__(self, pin, pull=None):
256+
def __init__(self, pin, **kwargs):
256257
"""
257-
pull: if passed in will be passed to switch_to_input
258-
see digitalio.DigitalInOut.switch_to_input for more details
258+
kwargs will be passed directly to switch_to_input
259+
pull (pull): pull configuration for the input
259260
"""
260-
kwargs = {k: v for k, v in (('pull', pull),) if not v is None}
261261
self.iopin = digitalio.DigitalInOut(pin)
262262
self.iopin.switch_to_input(**kwargs)
263263

0 commit comments

Comments
 (0)