We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents b1a232b + a78092f commit d7b8234Copy full SHA for d7b8234
adafruit_tca9548a.py
@@ -98,6 +98,13 @@ def scan(self) -> List[int]:
98
"""Perform an I2C Device Scan"""
99
return self.tca.i2c.scan()
100
101
+ def probe(self, address: int) -> bool:
102
+ """Check if an I2C device is at the specified address on the hub."""
103
+ # backwards compatibility for circuitpython <9.2
104
+ if hasattr(self.tca.i2c, "probe"):
105
+ return self.tca.i2c.probe(address)
106
+ return address in self.scan()
107
+
108
109
class TCA9548A:
110
"""Class which provides interface to TCA9548A I2C multiplexer."""
0 commit comments