stm32: fix f37x build.
originally broke in https://github.com/embassy-rs/embassy/pull/1762
This commit is contained in:
		
							
								
								
									
										1
									
								
								ci.sh
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								ci.sh
									
									
									
									
									
								
							@@ -81,6 +81,7 @@ cargo batch  \
 | 
			
		||||
    --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv6m-none-eabi --features nightly,stm32l041f6,defmt,exti,time-driver-any,unstable-traits \
 | 
			
		||||
    --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7m-none-eabi --features nightly,stm32l151cb-a,defmt,exti,time-driver-any,unstable-traits \
 | 
			
		||||
    --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7m-none-eabi --features nightly,stm32f398ve,defmt,exti,time-driver-any,unstable-traits \
 | 
			
		||||
    --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7m-none-eabi --features nightly,stm32f378cc,defmt,exti,time-driver-any,unstable-traits \
 | 
			
		||||
    --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv6m-none-eabi --features nightly,stm32g0c1ve,defmt,exti,time-driver-any,unstable-traits \
 | 
			
		||||
    --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7m-none-eabi --features nightly,stm32f217zg,defmt,exti,time-driver-any,unstable-traits \
 | 
			
		||||
    --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv8m.main-none-eabihf --features nightly,stm32l552ze,defmt,exti,time-driver-any,unstable-traits \
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
#![macro_use]
 | 
			
		||||
 | 
			
		||||
#[cfg(not(adc_f3))]
 | 
			
		||||
#[cfg(not(any(adc_f3, adc_f3_v2)))]
 | 
			
		||||
#[cfg_attr(adc_f1, path = "f1.rs")]
 | 
			
		||||
#[cfg_attr(adc_v1, path = "v1.rs")]
 | 
			
		||||
#[cfg_attr(adc_v2, path = "v2.rs")]
 | 
			
		||||
@@ -8,16 +8,16 @@
 | 
			
		||||
#[cfg_attr(adc_v4, path = "v4.rs")]
 | 
			
		||||
mod _version;
 | 
			
		||||
 | 
			
		||||
#[cfg(not(any(adc_f1, adc_f3)))]
 | 
			
		||||
#[cfg(not(any(adc_f1, adc_f3, adc_f3_v2)))]
 | 
			
		||||
mod resolution;
 | 
			
		||||
mod sample_time;
 | 
			
		||||
 | 
			
		||||
#[cfg(not(adc_f3))]
 | 
			
		||||
#[cfg(not(any(adc_f3, adc_f3_v2)))]
 | 
			
		||||
#[allow(unused)]
 | 
			
		||||
pub use _version::*;
 | 
			
		||||
#[cfg(not(any(adc_f1, adc_f3)))]
 | 
			
		||||
#[cfg(not(any(adc_f1, adc_f3, adc_f3_v2)))]
 | 
			
		||||
pub use resolution::Resolution;
 | 
			
		||||
#[cfg(not(adc_f3))]
 | 
			
		||||
#[cfg(not(any(adc_f3, adc_f3_v2)))]
 | 
			
		||||
pub use sample_time::SampleTime;
 | 
			
		||||
 | 
			
		||||
use crate::peripherals;
 | 
			
		||||
@@ -25,14 +25,14 @@ use crate::peripherals;
 | 
			
		||||
pub struct Adc<'d, T: Instance> {
 | 
			
		||||
    #[allow(unused)]
 | 
			
		||||
    adc: crate::PeripheralRef<'d, T>,
 | 
			
		||||
    #[cfg(not(adc_f3))]
 | 
			
		||||
    #[cfg(not(any(adc_f3, adc_f3_v2)))]
 | 
			
		||||
    sample_time: SampleTime,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
pub(crate) mod sealed {
 | 
			
		||||
    pub trait Instance {
 | 
			
		||||
        fn regs() -> crate::pac::adc::Adc;
 | 
			
		||||
        #[cfg(not(any(adc_f1, adc_v1, adc_f3)))]
 | 
			
		||||
        #[cfg(not(any(adc_f1, adc_v1, adc_f3, adc_f3_v2)))]
 | 
			
		||||
        fn common_regs() -> crate::pac::adccommon::AdcCommon;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -60,7 +60,7 @@ foreach_peripheral!(
 | 
			
		||||
            fn regs() -> crate::pac::adc::Adc {
 | 
			
		||||
                crate::pac::$inst
 | 
			
		||||
            }
 | 
			
		||||
            #[cfg(not(any(adc_f1, adc_v1, adc_f3)))]
 | 
			
		||||
            #[cfg(not(any(adc_f1, adc_v1, adc_f3, adc_f3_v2)))]
 | 
			
		||||
            fn common_regs() -> crate::pac::adccommon::AdcCommon {
 | 
			
		||||
                foreach_peripheral!{
 | 
			
		||||
                    (adccommon, $common_inst:ident) => {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
#[cfg(not(adc_f3))]
 | 
			
		||||
#[cfg(not(any(adc_f3, adc_f3_v2)))]
 | 
			
		||||
macro_rules! impl_sample_time {
 | 
			
		||||
    ($default_doc:expr, $default:ident, ($(($doc:expr, $variant:ident, $pac_variant:ident)),*)) => {
 | 
			
		||||
        #[doc = concat!("ADC sample time\n\nThe default setting is ", $default_doc, " ADC clock cycles.")]
 | 
			
		||||
 
 | 
			
		||||
@@ -9,7 +9,7 @@ use crate::time::Hertz;
 | 
			
		||||
#[cfg_attr(rcc_f0, path = "f0.rs")]
 | 
			
		||||
#[cfg_attr(any(rcc_f1, rcc_f100, rcc_f1cl), path = "f1.rs")]
 | 
			
		||||
#[cfg_attr(rcc_f2, path = "f2.rs")]
 | 
			
		||||
#[cfg_attr(rcc_f3, path = "f3.rs")]
 | 
			
		||||
#[cfg_attr(any(rcc_f3, rcc_f3_v2), path = "f3.rs")]
 | 
			
		||||
#[cfg_attr(any(rcc_f4, rcc_f410), path = "f4.rs")]
 | 
			
		||||
#[cfg_attr(rcc_f7, path = "f7.rs")]
 | 
			
		||||
#[cfg_attr(rcc_c0, path = "c0.rs")]
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user