Skip to content

Commit

Permalink
Merge pull request #764 from makermelissa/main
Browse files Browse the repository at this point in the history
Fix pulsein for the Pi 5 and make lockable silent
  • Loading branch information
makermelissa committed Dec 29, 2023
2 parents eafdc24 + 0aef83e commit 90a96ca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 0 additions & 2 deletions src/adafruit_blinka/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ def unlock(self):
"""Release the lock so others may use the resource."""
if self._locked:
self._locked = False
else:
raise ValueError("Not locked")


def patch_system():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,12 @@ def __init__(self, pin, maxlen=2, idle_state=False):
]
if idle_state:
cmd.append("-i")
cmd.append("gpiochip0")
cmd.append(str(pin))
if isinstance(pin.id, tuple):
cmd.append(f"gpiochip{pin.id[0]}")
cmd.append(str(pin.id[1]))
else:
cmd.append("gpiochip0")
cmd.append(str(pin))
if DEBUG:
print(cmd)

Expand Down

0 comments on commit 90a96ca

Please sign in to comment.