Refactor: Remove unused Common trait
				
					
				
			This commit is contained in:
		
							parent
							
								
									88bbc238b7
								
							
						
					
					
						commit
						6bf24b4d1a
					
				@ -29,11 +29,6 @@ pub(crate) mod sealed {
 | 
				
			|||||||
        fn common_regs() -> &'static crate::pac::adccommon::AdcCommon;
 | 
					        fn common_regs() -> &'static crate::pac::adccommon::AdcCommon;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    #[cfg(all(not(adc_f1), not(adc_v1)))]
 | 
					 | 
				
			||||||
    pub trait Common {
 | 
					 | 
				
			||||||
        fn regs() -> &'static crate::pac::adccommon::AdcCommon;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    pub trait AdcPin<T: Instance> {
 | 
					    pub trait AdcPin<T: Instance> {
 | 
				
			||||||
        fn channel(&self) -> u8;
 | 
					        fn channel(&self) -> u8;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@ -47,8 +42,7 @@ pub(crate) mod sealed {
 | 
				
			|||||||
pub trait Instance: sealed::Instance + 'static {}
 | 
					pub trait Instance: sealed::Instance + 'static {}
 | 
				
			||||||
#[cfg(any(adc_f1, adc_v2))]
 | 
					#[cfg(any(adc_f1, adc_v2))]
 | 
				
			||||||
pub trait Instance: sealed::Instance + crate::rcc::RccPeripheral + 'static {}
 | 
					pub trait Instance: sealed::Instance + crate::rcc::RccPeripheral + 'static {}
 | 
				
			||||||
#[cfg(all(not(adc_f1), not(adc_v1)))]
 | 
					
 | 
				
			||||||
pub trait Common: sealed::Common + 'static {}
 | 
					 | 
				
			||||||
pub trait AdcPin<T: Instance>: sealed::AdcPin<T> {}
 | 
					pub trait AdcPin<T: Instance>: sealed::AdcPin<T> {}
 | 
				
			||||||
pub trait InternalChannel<T>: sealed::InternalChannel<T> {}
 | 
					pub trait InternalChannel<T>: sealed::InternalChannel<T> {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -111,19 +105,6 @@ foreach_peripheral!(
 | 
				
			|||||||
    };
 | 
					    };
 | 
				
			||||||
);
 | 
					);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#[cfg(all(not(adc_f1), not(adc_v1)))]
 | 
					 | 
				
			||||||
foreach_peripheral!(
 | 
					 | 
				
			||||||
    (adccommon, $inst:ident) => {
 | 
					 | 
				
			||||||
        impl sealed::Common for peripherals::$inst {
 | 
					 | 
				
			||||||
            fn regs() -> &'static crate::pac::adccommon::AdcCommon {
 | 
					 | 
				
			||||||
                &crate::pac::$inst
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        impl crate::adc::Common for peripherals::$inst {}
 | 
					 | 
				
			||||||
    };
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
macro_rules! impl_adc_pin {
 | 
					macro_rules! impl_adc_pin {
 | 
				
			||||||
    ($inst:ident, $pin:ident, $ch:expr) => {
 | 
					    ($inst:ident, $pin:ident, $ch:expr) => {
 | 
				
			||||||
        impl crate::adc::AdcPin<peripherals::$inst> for crate::peripherals::$pin {}
 | 
					        impl crate::adc::AdcPin<peripherals::$inst> for crate::peripherals::$pin {}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user