Remove PeripheralRef::into_inner()

This commit is contained in:
Dario Nieuwenhuis
2022-07-23 14:27:45 +02:00
parent a158295782
commit f02ba35482
11 changed files with 156 additions and 105 deletions

View File

@ -49,8 +49,8 @@ impl<'d> Qdec<'d> {
b: impl Peripheral<P = impl GpioPin> + 'd,
config: Config,
) -> Self {
into_degraded_ref!(a, b);
Self::new_inner(qdec, irq, a, b, None, config)
into_ref!(a, b);
Self::new_inner(qdec, irq, a.map_into(), b.map_into(), None, config)
}
pub fn new_with_led(
@ -61,8 +61,8 @@ impl<'d> Qdec<'d> {
led: impl Peripheral<P = impl GpioPin> + 'd,
config: Config,
) -> Self {
into_degraded_ref!(a, b, led);
Self::new_inner(qdec, irq, a, b, Some(led), config)
into_ref!(a, b, led);
Self::new_inner(qdec, irq, a.map_into(), b.map_into(), Some(led.map_into()), config)
}
fn new_inner(