aboutsummaryrefslogtreecommitdiff
path: root/embassy-rp/src/adc.rs
Commit message (Collapse)AuthorAgeFilesLines
* Rustfmt for edition 2024.Dario Nieuwenhuis2025-10-061-4/+4
|
* rp: add missing `Debug` and `defmt::Format` `derive`s for ADCRalph Ursprung2025-05-151-0/+2
| | | | | this doesn't cover every `struct` & co. in `embassy-rp`, but at least it adds those needed for `Adc` and `adc::Channel`.
* Merge pull request #3999 from embassy-rs/peripehral-v2Dario Nieuwenhuis2025-03-271-16/+14
|\ | | | | Remove Peripheral trait, rename PeripheralRef->Peri.
| * Remove Peripheral trait, rename PeripheralRef->Peri.Dario Nieuwenhuis2025-03-271-16/+14
| |
* | rp/adc: fix potential race conditionAdrian Wowk2025-03-261-2/+4
|/ | | | | | This commit rearranges the Adc::wait_for_ready function to make sure that wakers are registered before the interrupt is enabled, and keeps enabling the interrupt until the ADC is ready
* Correct ADC channels for RP2350XBflippette2025-01-301-3/+13
|
* Desugar some async fnsDániel Buga2024-12-301-4/+4
|
* Fix CI, rename private feature, address comments from dirbaio.Caleb Jamison2024-08-121-2/+2
|
* Handle pad isolation everywhere and in the same way.Caleb Jamison2024-08-101-0/+2
|
* Initial rp235x supportCaleb Jamison2024-08-081-1/+26
| | | | Examples have been run, but there is not yet a test suite.
* Add comment about internal apikalkyl2024-06-221-0/+2
|
* rp: Add multichannel ADCkalkyl2024-06-051-5/+66
|
* rp: remove mod sealed.Dario Nieuwenhuis2024-04-051-13/+11
|
* fix minor clippy lints in embassy_rpRafael Bachmann2024-03-181-8/+3
|
* docs: document all embassy-rp public apisUlf Lilleengen2023-12-191-0/+24
| | | | Enable missing doc warnings.
* added sampling frequency setting to adc capture methods on rp2040Ilya Epifanov2023-10-091-2/+6
|
* rp: add single-channel dma from adcpennae2023-08-021-2/+113
| | | | | | | | | | with uniform treatment of adc inputs it's easy enough to add a new sampling method. dma sampling only supports one channel at the moment, though round-robin sampling would be a simple extension (probably a new trait that's implemented for Channel and &[Channel]). continuous dma as proposed in #1608 also isn't done here, we'd expect that to be a compound dma::Channel that internally splits a buffer in half and dispatches callbacks or something like that.
* rp: generalize adc inputs from pins to channelspennae2023-08-011-54/+48
| | | | | | this lets us treat pins and the temperature sensor uniformly using the same interface. uniformity in turn lets us add more adc features without combinatorial explosion of methods and types needed to handle them all.
* rp: remove AdcChannel::channelpennae2023-08-011-14/+7
| | | | | we're not using it, and actually using it is more trouble than it's worth. remove the false assurance instead.
* rp: add AdcChannel traitpennae2023-08-011-3/+5
| | | | | this is more general than AdcPin and can also cover the temperature sensor.
* Rename embassy-hal-common to embassy-hal-internal, document it's for ↵Dario Nieuwenhuis2023-07-281-1/+1
| | | | internal use only. (#1700)
* rp: disable adc hardware on Adc droppennae2023-07-201-0/+10
| | | | | | the adc constantly pulls a small but significant amount of current while the hardware is enabled. this can have quite an effect on sleeping devices that also use the adc.
* rp/adc: rewrite the modulepennae2023-07-071-84/+141
| | | | | | | | | | | | - don't require an irq binding for blocking-only adc - abstract adc pins into an AnyPin like interface, erasing the actual peripheral type at runtime. - add pull-up/pull-down functions for adc pins - add a test (mostly a copy of the example, to be honest) - configure adc pads according to datasheet - report conversion errors (although they seem exceedingly rare?) - drop embedded-hal interfaces. embedded-hal channels can do neither AnyPin nor pullup/pulldown without encoding both into the type
* disable pull-up and down resistors for rp adc blocking_readDietrich Beck2023-06-221-2/+8
|
* rp: update rp-pac.Dario Nieuwenhuis2023-06-161-66/+54
|
* Make interrupt module more standard.Dario Nieuwenhuis2023-06-081-9/+7
| | | | | | | | | | | | - Move typelevel interrupts to a special-purpose mod: `embassy_xx::interrupt::typelevel`. - Reexport the PAC interrupt enum in `embassy_xx::interrupt`. This has a few advantages: - The `embassy_xx::interrupt` module is now more "standard". - It works with `cortex-m` functions for manipulating interrupts, for example. - It works with RTIC. - the interrupt enum allows holding value that can be "any interrupt at runtime", this can't be done with typelevel irqs. - When "const-generics on enums" is stable, we can remove the typelevel interrupts without disruptive changes to `embassy_xx::interrupt`.
* cortex-m: remove owned interrupts.Dario Nieuwenhuis2023-06-011-3/+3
|
* rp: remove take!, add bind_interrupts!pennae2023-05-151-12/+19
|
* fix: rp - disable Pull-down/up resistors for ADC readLachezar Lechev2023-02-281-1/+10
| | | | Signed-off-by: Lachezar Lechev <[email protected]>
* Change interrupt modify into writeHenrik Alsér2022-11-221-2/+2
|
* CleanupHenrik Alsér2022-11-151-6/+1
|
* embassy-rp: Add basic ADC moduleHenrik Alsér2022-11-151-0/+178