Skip to content

DRAFT - Rewrite of ADC code#811

Closed
rnd-ash wants to merge 14 commits intoatsamd-rs:feat/adc-v2from
rnd-ash:adc_v2
Closed

DRAFT - Rewrite of ADC code#811
rnd-ash wants to merge 14 commits intoatsamd-rs:feat/adc-v2from
rnd-ash:adc_v2

Conversation

@rnd-ash
Copy link
Copy Markdown
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.

@rnd-ash rnd-ash closed this Jan 20, 2025
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