diff --git a/simpleio.py b/simpleio.py index 60870c9..7fdb3ab 100644 --- a/simpleio.py +++ b/simpleio.py @@ -228,11 +228,15 @@ def deinit(self): class DigitalOut: """ - Simple digital output that is valid until soft reset. + Simple digital output that is valid until reload. + + :param pin microcontroller.Pin: output pin + :param value bool: default value + :param drive_mode digitalio.DriveMode: drive mode for the output """ - def __init__(self, pin): + def __init__(self, pin, **kwargs): self.iopin = digitalio.DigitalInOut(pin) - self.iopin.switch_to_output() + self.iopin.switch_to_output(**kwargs) @property def value(self): @@ -245,11 +249,14 @@ def value(self, value): class DigitalIn: """ - Simple digital input that is valid until soft reset. + Simple digital input that is valid until reload. + + :param pin microcontroller.Pin: input pin + :param pull digitalio.Pull: pull configuration for the input """ - def __init__(self, pin): + def __init__(self, pin, **kwargs): self.iopin = digitalio.DigitalInOut(pin) - self.iopin.switch_to_input() + self.iopin.switch_to_input(**kwargs) @property def value(self):