Refactor: Fix v4 RccPeripheral
bounds
This commit is contained in:
parent
9c30d565b9
commit
4f2dcca34b
2 changed files with 3 additions and 3 deletions
|
@ -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 {}
|
||||
#[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 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 {
|
||||
embassy_hal_common::into_ref!(_peri);
|
||||
T::enable();
|
||||
|
|
Loading…
Reference in a new issue