We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d86fc7e commit 3a1339cCopy full SHA for 3a1339c
adafruit_bus_device/i2c_device.py
@@ -57,11 +57,11 @@ class I2CDevice:
57
device.write(bytes_read)
58
"""
59
def __init__(self, i2c, device_address):
60
- # Verify that a device with that address exists.
+ # write non-zero byte value to verify device exists at address
61
while not i2c.try_lock():
62
pass
63
try:
64
- i2c.writeto(device_address, b'')
+ i2c.writeto(device_address, b'x')
65
except OSError:
66
raise ValueError("No I2C device at address: %x" % device_address)
67
finally:
0 commit comments