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

Allow free-running ADC mode without FIFO #739

Merged
merged 9 commits into from
Feb 24, 2024
Merged

Conversation

jannic
Copy link
Member

@jannic jannic commented Dec 22, 2023

  • Renamed AdcFifoBuilder::prepare(self) to AdcFifoBuilder::start_paused(self) as it more clearly describes what it does.
  • Added new trait AdcChannel, implemented by AdcPin and TempSense. Main difference to embedded hal's Channel type: AdcChannel::channel(&self) has the &self parameter, so it can be sanely implemented for DynPin.
  • Added Adc::free_running(&mut self, pin: &dyn AdcChannel) to configure free-running mode on an ADC
  • Added Adc::wait_ready(&self) and Adc::is_ready(&self) mainly for completeness (not sure if they are useful?)
  • Added AdcFifo::trigger(&mut self) to be able to use AdcFifo without free-running mode
  • Added AdcFifo::is_ready(&self)
  • Added more doc comments

@jannic jannic force-pushed the adc-fifo branch 5 times, most recently from 9a88d2f to 66e93e5 Compare December 22, 2023 22:29
@jannic jannic marked this pull request as ready for review January 3, 2024 19:41
@jannic jannic added enhancement New feature or request breaking change This pull request contains a SemVer breaking change labels Jan 13, 2024
@jannic jannic added this to the 0.10.0 milestone Feb 22, 2024
@jannic jannic merged commit 2987210 into rp-rs:main Feb 24, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change This pull request contains a SemVer breaking change enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AdcFifo not configurable with DynPin API ergonomics for ADC free running mode when not using FIFO
2 participants