Skip to content

Commit 1e52114

Browse files
committed
Bugfix Channel Scan
This Commit, - Fixes Bug with Channel scan
1 parent e79e116 commit 1e52114

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

adafruit_tca9548a.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,11 @@ def writeto_then_readfrom(self, address, buffer_out, buffer_in, **kwargs):
7777

7878
def scan(self):
7979
"""Perform an I2C Device Scan"""
80-
return self.tca.i2c.scan()
80+
self.try_lock()
81+
try:
82+
return self.tca.i2c.scan()
83+
finally:
84+
self.unlock()
8185

8286

8387
class TCA9548A:

0 commit comments

Comments
 (0)