diff --git a/adafruit_pcf8575.py b/adafruit_pcf8575.py index f2d1345..001fee5 100644 --- a/adafruit_pcf8575.py +++ b/adafruit_pcf8575.py @@ -87,7 +87,7 @@ def write_pin(self, pin: int, val: bool) -> None: """Set a single GPIO pin high/pulled-up or driven low :param int pin: The pin number - :param bool vale: The state to set + :param bool val: The state to set """ buff = self._writebuf[0] | (self._writebuf[1] << 8) @@ -104,7 +104,7 @@ def read_pin(self, pin: int) -> bool: :param int pin: The pin number """ - return (self.read_gpio() >> pin) & 0x1 + return bool((self.read_gpio() >> pin) & 0x1) """ @@ -131,7 +131,7 @@ def __init__(self, pin_number: int, pcf: PCF8575) -> None: """Specify the pin number of the PCF8575 0..15, and instance. :param int pin_number: The pin number - :param PCF8575 pfc: The associated PCF8575 instance + :param PCF8575 pcf: The associated PCF8575 instance """ self._pin = pin_number