Skip to content

Commit 1c34beb

Browse files
committed
longer description of changes
1 parent 099669f commit 1c34beb

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

  • src/adafruit_blinka/microcontroller/generic_linux

src/adafruit_blinka/microcontroller/generic_linux/i2c.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,13 @@ def __init__(self, bus_num, mode=MASTER, baudrate=None):
4141
# pylint: enable=unused-argument
4242

4343
def scan(self):
44-
"""Probe each address; return those that ACK."""
44+
"""Scan I2C bus for devices.
45+
46+
On Linux, some devices will NACK SMBus 'read_byte' probes but respond fine
47+
to real I2C transactions. Prefer SMBus 'quick' probe when supported, and
48+
fall back to 'read_byte'. Skip reserved address ranges by scanning only
49+
0x08..0x77.
50+
"""
4551
found = []
4652
for addr in range(0x08, 0x78):
4753
try:

0 commit comments

Comments
 (0)