@@ -232,8 +232,9 @@ class DigitalOut:
232
232
"""
233
233
def __init__ (self , pin , value = None , drive_mode = None ):
234
234
"""
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
237
238
"""
238
239
kwargs = {k : v for k , v in (('value' , value ), ('drive_mode' , drive_mode )) if not v is None }
239
240
self .iopin = digitalio .DigitalInOut (pin )
@@ -252,12 +253,11 @@ class DigitalIn:
252
253
"""
253
254
Simple digital input that is valid until soft reset.
254
255
"""
255
- def __init__ (self , pin , pull = None ):
256
+ def __init__ (self , pin , ** kwargs ):
256
257
"""
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
259
260
"""
260
- kwargs = {k : v for k , v in (('pull' , pull ),) if not v is None }
261
261
self .iopin = digitalio .DigitalInOut (pin )
262
262
self .iopin .switch_to_input (** kwargs )
263
263
0 commit comments