adafruit / Adafruit_CircuitPython_BusDevice

Two helper classes that handle transaction related state for I2C and SPI including locks.
MIT License
108 stars 76 forks source link

Adding ability to skip device probing upon object init. … #35

Closed osterwood closed 4 years ago

osterwood commented 4 years ago

Some hardware devices do not respond to these probes, or could be in reset when software object is created. Default behavior is the same (probing occurs).

ladyada commented 4 years ago

hiya what hardware devices don't respond? its good to know :)

osterwood commented 4 years ago

PCA9536 is one. Doesn't appear to linux's i2cdetect either.

tannewt commented 4 years ago

Hi! Would you mind moving the try/except into a separate private method? It'll make the __init__ clearer that way. Please rephrase the existing comment to mention that it's only done when probe is true. Thanks!