adafruit / Adafruit_CircuitPython_TCA9548A

CircuitPython driver for the TCA9548A I2C Multiplexer.
MIT License
26 stars 15 forks source link

software reset #30

Closed codenio closed 10 months ago

codenio commented 3 years ago

By passing dedicated GPIO Pin to TCA9548A object, we could define software reset function within this library. Is this a valid feature..?

Thoughts & Comments..?

jposada202020 commented 3 years ago

I took at the datasheet. then I came and read the proposed changes it was not obvious how to do this. I guess we are talking here to use image? I think it will be a little in the weeds to use it, but an example will help illustrate the case

caternuson commented 3 years ago

The dedicated GPIO pin being passed in is also wired to the RESET pin on the TCA9548A? And this would just abstract the toggling of that pin into some reset() function? Something like that could be supported by adding new kwarg to init that defaults to None, so there would be no change to current behavior.

Keep in mind you can do this already, by just toggling the GPIO pin in you user code.

codenio commented 3 years ago

Keep in mind you can do this already, by just toggling the GPIO pin in your user code.

yes, raised this issue exactly after the realization that It could actually be a feature.

A Software handler for existing hardware reset functionality, which can be used for i2c MUX handling exceptions and auto reset.

caternuson commented 1 year ago

For anyone still monitoring this thread, there's a PR here that adds this: https://github.com/adafruit/Adafruit_CircuitPython_TCA9548A/pull/50 Please test this with your setups if possible to see if it helps recover from the bad state.

caternuson commented 10 months ago

Closing for now due to lack of response. A PR was made (#50) for this, but closed without merging since there was no feedback from this thread.