Skip to content

Commit

Permalink
try_lock increase wait time from 0 to 1 ms
Browse files Browse the repository at this point in the history
  • Loading branch information
ilario committed Aug 7, 2024
1 parent 46e2b59 commit ab6201f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion adafruit_tca9548a.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def __init__(self, tca: "TCA9548A", channel: int) -> None:
def try_lock(self) -> bool:
"""Pass through for try_lock."""
while not self.tca.i2c.try_lock():
time.sleep(0)
time.sleep(0.001)
self.tca.i2c.writeto(self.tca.address, self.channel_switch)
return True

Expand Down

0 comments on commit ab6201f

Please sign in to comment.