Refactor: Fix v4 RccPeripheral
bounds
This commit is contained in:
parent
9c30d565b9
commit
4f2dcca34b
@ -44,9 +44,9 @@ pub(crate) mod sealed {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(any(adc_f1, adc_v2)))]
|
#[cfg(not(any(adc_f1, adc_v2, adc_v4)))]
|
||||||
pub trait Instance: sealed::Instance + 'static {}
|
pub trait Instance: sealed::Instance + 'static {}
|
||||||
#[cfg(any(adc_f1, adc_v2))]
|
#[cfg(any(adc_f1, adc_v2, adc_v4))]
|
||||||
pub trait Instance: sealed::Instance + crate::rcc::RccPeripheral + 'static {}
|
pub trait Instance: sealed::Instance + crate::rcc::RccPeripheral + 'static {}
|
||||||
|
|
||||||
pub trait AdcPin<T: Instance>: sealed::AdcPin<T> {}
|
pub trait AdcPin<T: Instance>: sealed::AdcPin<T> {}
|
||||||
|
@ -225,7 +225,7 @@ impl Prescaler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'d, T: Instance + crate::rcc::RccPeripheral> Adc<'d, T> {
|
impl<'d, T: Instance> Adc<'d, T> {
|
||||||
pub fn new(_peri: impl Peripheral<P = T> + 'd, delay: &mut impl DelayUs<u16>) -> Self {
|
pub fn new(_peri: impl Peripheral<P = T> + 'd, delay: &mut impl DelayUs<u16>) -> Self {
|
||||||
embassy_hal_common::into_ref!(_peri);
|
embassy_hal_common::into_ref!(_peri);
|
||||||
T::enable();
|
T::enable();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user