We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This is not an issue, but a sharing of knowledge that I wanted to have when I started.
It is about rp2040_hal::gpio::Pin .
rp2040_hal::gpio::Pin
at v0.9.0 it is like,
rp-hal/rp2040-hal/src/gpio/mod.rs
Lines 161 to 165 in 8f3e8d0
at v0.8.0 and v0.7.0 respectively, it was like,
rp-hal/rp2040-hal/src/gpio/pin.rs
Lines 450 to 457 in f6a0d1b
Lines 450 to 457 in 4c8e16a
Suppose we had a trait like this.
pub trait PinIdNum { fn get_id_num(&self) -> u8; }
for v0.9.0 you can implement it like this.
impl<I, F, P> PinIdNum for Pin<I, F, P> where I: PinId, F: Function, P: PullType { fn get_id_num(&self) -> u8 { self.id().num } }
for v0.8.0 it can be like following two ways.
impl<I, M> PinIdNum for Pin<I, M> where I: PinId, M: PinMode + ValidPinMode<I> { fn get_id_num(&self) -> u8 { self.id().num } }
impl<I, M> PinIdNum for Pin<I, M> where I: PinId, M: PinMode + ValidPinMode<I> { fn get_id_num(&self) -> u8 { I::DYN.num } }
for v0.7.0 only the latter of above two is valid.
The text was updated successfully, but these errors were encountered:
version correspondence rp-pico 0.6.0 => rp2040-hal 0.7.0 rp-pico 0.7.0 => rp2040-hal 0.8.0 rp-pico 0.8.0 => rp2040-hal 0.9.0
Sorry, something went wrong.
No branches or pull requests
This is not an issue, but a sharing of knowledge that I wanted to have when I started.
It is about
rp2040_hal::gpio::Pin
.at v0.9.0 it is like,
rp-hal/rp2040-hal/src/gpio/mod.rs
Lines 161 to 165 in 8f3e8d0
at v0.8.0 and v0.7.0 respectively, it was like,
rp-hal/rp2040-hal/src/gpio/pin.rs
Lines 450 to 457 in f6a0d1b
rp-hal/rp2040-hal/src/gpio/pin.rs
Lines 450 to 457 in 4c8e16a
Suppose we had a trait like this.
for v0.9.0 you can implement it like this.
for v0.8.0 it can be like following two ways.
for v0.7.0 only the latter of above two is valid.
The text was updated successfully, but these errors were encountered: