aboutsummaryrefslogtreecommitdiff
path: root/examples/rp/src/bin/adc.rs
Commit message (Collapse)AuthorAgeFilesLines
* add the possibility to document `bind_interrupts` `struct`sRalph Ursprung2025-05-151-3/+6
| | | | | | | | | | | | the `bind_interrupts` macro creates a `struct` for the interrupts. it was so far not possible to document those (except for STM32) and there was no generic documentation being generated/added either, thus the `missing_docs` lint was triggered for consumers which enabled it. with this change it is now possible to manually add a comment on the `struct` being defined in the macro invocation. to show that this works one RP example has been modified accordingly.
* ci: use beta, add secondary nightly ci.Dario Nieuwenhuis2023-12-211-1/+0
|
* time: Update examples, tests, and other code to use new Timer::after_x ↵Adam Greig2023-10-151-2/+2
| | | | convenience methods
* rp: add single-channel dma from adcpennae2023-08-021-1/+1
| | | | | | | | | | 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-5/+6
| | | | | | 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.
* Round temp to make more sense.Henrik Berg2023-07-131-1/+4
|
* Add descriptions to all RP2040 examples. Some need hardware that was not ↵Henrik Berg2023-07-131-1/+4
| | | | specified.
* rp/adc: rewrite the modulepennae2023-07-071-8/+9
| | | | | | | | | | | | - 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
* rp: remove take!, add bind_interrupts!pennae2023-05-151-4/+7
|
* cargo fmtAaron Tsui2022-12-201-2/+2
|
* add convert_to_celsius function in the adc moduleAaron Tsui2022-12-201-1/+6
| | | | | | modify RP2040 adc example to get inside biased bipolar diode voltage, then convert this temperature sensor data into Celsius degree, according to chapter 4.9.5. Temperature Sensor in RP2040 datasheet.
* embassy-rp: Add basic ADC moduleHenrik Alsér2022-11-151-0/+33