periph/adc: introduce periph_adc_continuous#20045
Merged
benpicco merged 3 commits intoRIOT-OS:masterfrom Nov 10, 2023
Merged
Conversation
51ef1fb to
30bbd17
Compare
30bbd17 to
ebbf012
Compare
Member
|
Should we consider it as API changes ? (even if there is no changes, just addition) |
Member
I'd say we rather should label this as a new feature, not as an API change. (And I already did so.) |
maribu
approved these changes
Nov 6, 2023
Member
maribu
left a comment
There was a problem hiding this comment.
The code looks good to me, the API makes sense and is well aligned with the current API, and I trust your testing
ebbf012 to
92848dd
Compare
92848dd to
d3dfd4b
Compare
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
The current ADC API configure the ADC for each measurement and turn it off afterwards.
This is a problem as the voltage on the ADC may take some time to settle, so what we actually measure is this:
For periodic / frequent measurements the overhead of always turning off and on the ADC is also significant.
Testing procedure
The effect becomes evident with the test application already:
tests/periph/adc
tests/periph/adc_continous
Issues/PRs references
This is meant as a stop-gap solution to fix an existing application until we have #13247