Skip to content

Commit

Permalink
modules pcf8574/5 always use pullups (#234)
Browse files Browse the repository at this point in the history
* allow to not use pullups for PCF8574 module
* allow to not use pullups for PCF8575 module
  • Loading branch information
IlmLV authored Jul 11, 2023
1 parent 9de3e74 commit 8a6d7e7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mqtt_io/modules/gpio/pcf8574.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def setup_pin(
pin_config: ConfigType,
initial: Optional[str] = None,
) -> None:
if direction == PinDirection.INPUT and pullup is not None:
if direction == PinDirection.INPUT and self.pullup_map[pullup] is not None:
self.io.port[pin] = self.pullup_map[pullup]
initial = pin_config.get("initial")
if initial is not None:
Expand Down
2 changes: 1 addition & 1 deletion mqtt_io/modules/gpio/pcf8575.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def setup_pin(
pin_config: ConfigType,
initial: Optional[str] = None,
) -> None:
if direction == PinDirection.INPUT and pullup is not None:
if direction == PinDirection.INPUT and self.pullup_map[pullup] is not None:
self.io.port[pin] = self.pullup_map[pullup]
initial = pin_config.get("initial")
if initial is not None:
Expand Down

0 comments on commit 8a6d7e7

Please sign in to comment.