-
Notifications
You must be signed in to change notification settings - Fork 2.1k
drivers: add a common driver for ADS1X1X #21693
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
Closed
Closed
Conversation
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
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Area: BLE
Area: Bluetooth Low Energy support
Area: boards
Area: Board ports
Area: build system
Area: Build system
Area: CoAP
Area: Constrained Application Protocol implementations
Area: core
Area: RIOT kernel. Handle PRs marked with this with care!
Area: cpu
Area: CPU/MCU ports
Area: doc
Area: Documentation
Area: drivers
Area: Device drivers
Area: examples
Area: Example Applications
Area: Kconfig
Area: Kconfig integration
Area: LoRa
Area: LoRa radio support
Area: network
Area: Networking
Area: OTA
Area: Over-the-air updates
Area: pkg
Area: External package ports
Area: sys
Area: System
Area: tests
Area: tests and testing framework
Area: timers
Area: timer subsystems
Area: tools
Area: Supplementary tools
Platform: ARM
Platform: This PR/issue effects ARM-based platforms
Platform: ESP
Platform: This PR/issue effects ESP-based platforms
Platform: MSP
Platform: This PR/issue effects MSP-based platforms
Platform: native
Platform: This PR/issue effects the native platform
Platform: RISC-V
Platform: This PR/issue effects RISC-V-based platforms
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