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
Add ADC API #173
Add ADC API #173
Conversation
This makes it possible to add channel-specific code to this trait, which is required for some features, like setting the sampling time, or internal channels.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution!
Overall this looks good to me!
I will try to test it in the coming week when i have some hardware with ADC available at hand.
Added a minor suggestion on a dead_code allowance to please the CI
Co-authored-by: Mathias Koch <smilykoch@gmail.com>
Thanks for the review! I've applied your suggested change. |
Anything I can do to help this along? |
Sorry! I have been a bit busy at work lately, so i have not had a chance to test it on actual hardware. How about you @korken89 ? |
Hi, could you add using This is the only thing missing from a quick look. |
No need to apologize! For what it's worth, it works for me, and I agree with your analysis here. This isn't going to break anyone's use case.
Well, I could write the code, but I would have no way to test it (all I have available is an L433). Would it maybe be better to merge this PR now, then extend the API in a separate one once your PR makes its way downstream? Seems like less effort overall. |
@hannobraun Sure, sounds fair to me. After this I'd say this is ready for merge! |
@@ -60,6 +60,8 @@ pub use crate::pac as stm32; | |||
|
|||
pub mod traits; | |||
|
|||
#[cfg(feature = "stm32l4x3")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It also needs updating here to support the rest of the MCUs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added that to reflect what I had tested. I'm sure it compiles and works for other targets too (at least some of them).
Or, you know what, I can fix all that. |
Thanks, @korken89! |
No description provided.