Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ads1115.setup() performs reset of all i2c devices #2238

Open
paweljasinski opened this issue Jan 22, 2018 · 9 comments
Open

ads1115.setup() performs reset of all i2c devices #2238

paweljasinski opened this issue Jan 22, 2018 · 9 comments
Assignees

Comments

@paweljasinski
Copy link
Contributor

Missing feature

The current released ads1115 module issues a i2c general reset during the setup()
This reset is not specific to ads hardware.
How about moving it to the i2c module.

Justification

It is likely another module using i2c implements the same reset logic.

Workarounds

The setup of ads1115 has to be called before other i2c devices are programmed.

@devsaurus
Copy link
Member

I'm not familiar with the ads1115 architecture, but I see that you moved the I2C reset command into a dedicated function with #2231 - is this issue here still applicable once #2231 got merged?

@paweljasinski
Copy link
Contributor Author

The ads1115 specific issue is gone, but in my opinion, the reset function does not belong to ads1115 module.
For example: In addiction to ads1115 I have dac on the i2c bus, and it does obey the general reset command. The reset command is not specific to ads1115. It feels natural to move the reset to i2c.

@devsaurus
Copy link
Member

the reset function does not belong to ads1115 module.

After reading through the I2C spec chapters for "General call address" and "Software reset" I also think that the generic bus reset should not be part of a device-specific module.

Consequently, the i2c module might benefit from a function to issue general calls. That would be more for user's convenience than driven by functional requirements, since the corresponding sequence can be generated with existing i2c functions. Something like

i2c.general_call(id, second_byte[, <more bytes>])
-- with constants for <second_byte>
-- i2c.RESET_AND_WRITE_SLA
-- i2c.WRITE_SLA

Is this a reasonable improvement of the i2c module? Any objections from others?

@stale
Copy link

stale bot commented Jul 21, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jul 21, 2019
@devsaurus
Copy link
Member

Issue should be kept.

@stale stale bot removed the stale label Jul 21, 2019
@stale
Copy link

stale bot commented Jul 16, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jul 16, 2020
@nwf
Copy link
Member

nwf commented Jul 18, 2020

Probably still an issue. Belatedly, I see no reason not to add general_call functionality to the i2c module.

@stale stale bot removed the stale label Jul 18, 2020
@stale
Copy link

stale bot commented Jul 21, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jul 21, 2021
@HHHartmann
Copy link
Member

Still hoping to get this fixed

@stale stale bot removed the stale label Jul 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants