drivers: add a common driver for ADS1X1X#21693
Closed
baptleduc wants to merge 205 commits intoRIOT-OS:masterfrom
Closed
drivers: add a common driver for ADS1X1X#21693baptleduc wants to merge 205 commits intoRIOT-OS:masterfrom
baptleduc wants to merge 205 commits intoRIOT-OS:masterfrom
Conversation
Co-authored-by: benpicco <[email protected]>
Co-authored-by: namberino <[email protected]>
fixup! tests/net/ieee802154_submac: add ESP32x IEEE 802.15.4 suppport
To be able to control whether `default_CSPNRG` is used or not during compilation, `define_RNG_default` is defined conditionally. This is needed for example to compile BLE for ESP32-H2.
Contributor
|
I think a rebase went wrong here 👀 |
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contribution description
While attempting to create a driver for my ADS1115 (this PR), I realized that a driver already exists here. However, the existing driver does not fully support the ADS111x family (datasheet here), which differs from the ADS101x series (datasheet here in several aspects such as bit resolution and maximum sample rate (see page 3 of the datasheet).
I have therefore implemented a common driver for the ADS1x1x family, better documented and inspired by the existing ADS101x driver. This unified driver supports both ADS101x and ADS111x variants, handling their differences internally.
Testing procedure
I adapted the existing test
tests/drivers/ads101xto create `tests/drivers/ads111x and compared the outputs to ensure identical behavior and no regressions.It may be worth adding a helper function to verify the configuration register after each write, to ensure it contains the expected value.
Open questions
Element.io, @Enoch247 pointed out that my current family-selection system is exclusive, which prevents supporting a case where both an ADS101x and an ADS111x driver are used in the same application. How should this be handled?i2c_read_regsandi2c_write_regsevery time?I2C_NODEVandI2C_NOI2C, so I am not sure I have used them correctly throughout the driver.Issues/PRs references
Follow-up from PR
See the original issue : #21612