Skip to content

Commit c722041

Browse files
authored
Merge pull request #30 from apatt/master
#10
2 parents 549c6e4 + a5f72b4 commit c722041

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

simpleio.py

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -228,11 +228,15 @@ def deinit(self):
228228

229229
class DigitalOut:
230230
"""
231-
Simple digital output that is valid until soft reset.
231+
Simple digital output that is valid until reload.
232+
233+
:param pin microcontroller.Pin: output pin
234+
:param value bool: default value
235+
:param drive_mode digitalio.DriveMode: drive mode for the output
232236
"""
233-
def __init__(self, pin):
237+
def __init__(self, pin, **kwargs):
234238
self.iopin = digitalio.DigitalInOut(pin)
235-
self.iopin.switch_to_output()
239+
self.iopin.switch_to_output(**kwargs)
236240

237241
@property
238242
def value(self):
@@ -245,11 +249,14 @@ def value(self, value):
245249

246250
class DigitalIn:
247251
"""
248-
Simple digital input that is valid until soft reset.
252+
Simple digital input that is valid until reload.
253+
254+
:param pin microcontroller.Pin: input pin
255+
:param pull digitalio.Pull: pull configuration for the input
249256
"""
250-
def __init__(self, pin):
257+
def __init__(self, pin, **kwargs):
251258
self.iopin = digitalio.DigitalInOut(pin)
252-
self.iopin.switch_to_input()
259+
self.iopin.switch_to_input(**kwargs)
253260

254261
@property
255262
def value(self):

0 commit comments

Comments
 (0)