Closed Guelakais closed 1 year ago
It looks like it's indeed not possible with the current interface.
I wrote an implementation of Channel
If you want to try it, you can add this to your Cargo.toml:
[patch.crates-io]
rp2040-hal = { version = "0.8.0", git = "https://github.com/rp-rs/rp-hal", rev = "204b5b2683009d29bab4f9632b3864440f125d36" }
The following code creates a problem. `#![no_std]
![no_main]
use embedded_hal::{adc::OneShot, digital::v2::ToggleableOutputPin}; use panichalt as ; use rp2040_hal; use rp2040_hal::{ adc::Adc, clocks::Clock, gpio::{DynPin, Pins}, pac, };
[link_section = ".boot2"]
[used]
pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_GENERIC_03H; const XTAL_FREQ_HZ: u32 = 12_000_000u32;
[rp2040_hal::entry]
fn main() -> ! { let mut pac = pac::Peripherals::take().unwrap(); let core = pac::CorePeripherals::take().unwrap();
The Error is:
error[E0277]: the trait boundDynPin: embedded_hal::adc::Channel<Adc>
is not satisfied --> src/bin/adc.rs:52:48embedded_hal::adc::Channel<Adc>
is not implemented forDynPin
` Is there a way to get the pins back so that I can process them normally with ADC? Do I need that at all to work with analog sensors?