Skip to content
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

DRAFT - Rewrite of ADC code #811

Draft
wants to merge 14 commits into
base: feat/adc-v2
Choose a base branch
from
Draft

Conversation

rnd-ash
Copy link
Contributor

@rnd-ash rnd-ash commented Jan 10, 2025

Draft PR - Don't merge

As mentioned in #796 , the ADC code requires a re-write in order to make it compatible with Clock V2 API, and to give it an async API.

This Draft PR will track progress I'm making towards this goal.

I've so far created a settings builder type that should be compatible with both 21 and 51 series chips, it allows the user to configure more parameters on how the ADC will sample its data (Along with some good defaults). This is required since due to Clock V2, the ADC clock might not be running at 48Mhz, meaning there is no way to assume the actual sample rate of the ADC at the HAL level, therefore this settings builder also has a calculate_sps method so that the user can get an estimated sample rate of the ADC with their desired settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants