-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Zephyr: Add ADC support. #17616
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
base: master
Are you sure you want to change the base?
Zephyr: Add ADC support. #17616
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #17616 +/- ##
=======================================
Coverage 98.56% 98.56%
=======================================
Files 169 169
Lines 21946 21948 +2
=======================================
+ Hits 21632 21634 +2
Misses 314 314 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Code size report:
|
Hi @bikeNomad and thank you for this merge request. There seems to be a number of other commits included. Would it be possible to have just the commits related to the ADC here? |
I've now merged those other PRs, so please can you rebase this PR on latest master? |
This provides ADC functionality for Zephyr ports. It requires a particular devicetree structure to be able to find the ADC channels. Signed-off-by: Ned Konz <ned@metamagix.tech>
b293326
to
2d35d46
Compare
Done. |
Summary
This PR adds support for ADC peripherals in the Zephyr port.
As is typical for Zephyr, the ADC channel setup is done in the devicetree (typically using an overlay).
This code requires ADC channels to be listed in the
io-channels
property of thezephyr,user
root node like this:Testing
I have tested this on the Seeed Studio XIAO BLE NRF52840 SENSE board.
Trade-offs and Alternatives
This code may be enabled and disabled by the usual means in
mpconfigport.h
: