stm32: suppress adc f3
This commit is contained in:
parent
64f8a779ca
commit
192cdc2f85
@ -1,5 +1,6 @@
|
|||||||
#![macro_use]
|
#![macro_use]
|
||||||
|
|
||||||
|
#[cfg(not(adc_f3))]
|
||||||
#[cfg_attr(adc_f1, path = "f1.rs")]
|
#[cfg_attr(adc_f1, path = "f1.rs")]
|
||||||
#[cfg_attr(adc_v1, path = "v1.rs")]
|
#[cfg_attr(adc_v1, path = "v1.rs")]
|
||||||
#[cfg_attr(adc_v2, path = "v2.rs")]
|
#[cfg_attr(adc_v2, path = "v2.rs")]
|
||||||
@ -7,14 +8,16 @@
|
|||||||
#[cfg_attr(adc_v4, path = "v4.rs")]
|
#[cfg_attr(adc_v4, path = "v4.rs")]
|
||||||
mod _version;
|
mod _version;
|
||||||
|
|
||||||
#[cfg(not(adc_f1))]
|
#[cfg(not(any(adc_f1, adc_f3)))]
|
||||||
mod resolution;
|
mod resolution;
|
||||||
mod sample_time;
|
mod sample_time;
|
||||||
|
|
||||||
|
#[cfg(not(adc_f3))]
|
||||||
#[allow(unused)]
|
#[allow(unused)]
|
||||||
pub use _version::*;
|
pub use _version::*;
|
||||||
#[cfg(not(adc_f1))]
|
#[cfg(not(any(adc_f1, adc_f3)))]
|
||||||
pub use resolution::Resolution;
|
pub use resolution::Resolution;
|
||||||
|
#[cfg(not(adc_f3))]
|
||||||
pub use sample_time::SampleTime;
|
pub use sample_time::SampleTime;
|
||||||
|
|
||||||
use crate::peripherals;
|
use crate::peripherals;
|
||||||
@ -22,13 +25,14 @@ use crate::peripherals;
|
|||||||
pub struct Adc<'d, T: Instance> {
|
pub struct Adc<'d, T: Instance> {
|
||||||
#[allow(unused)]
|
#[allow(unused)]
|
||||||
adc: crate::PeripheralRef<'d, T>,
|
adc: crate::PeripheralRef<'d, T>,
|
||||||
|
#[cfg(not(adc_f3))]
|
||||||
sample_time: SampleTime,
|
sample_time: SampleTime,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) mod sealed {
|
pub(crate) mod sealed {
|
||||||
pub trait Instance {
|
pub trait Instance {
|
||||||
fn regs() -> crate::pac::adc::Adc;
|
fn regs() -> crate::pac::adc::Adc;
|
||||||
#[cfg(all(not(adc_f1), not(adc_v1)))]
|
#[cfg(not(any(adc_f1, adc_v1, adc_f3)))]
|
||||||
fn common_regs() -> crate::pac::adccommon::AdcCommon;
|
fn common_regs() -> crate::pac::adccommon::AdcCommon;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -56,7 +60,7 @@ foreach_peripheral!(
|
|||||||
fn regs() -> crate::pac::adc::Adc {
|
fn regs() -> crate::pac::adc::Adc {
|
||||||
crate::pac::$inst
|
crate::pac::$inst
|
||||||
}
|
}
|
||||||
#[cfg(all(not(adc_f1), not(adc_v1)))]
|
#[cfg(not(any(adc_f1, adc_v1, adc_f3)))]
|
||||||
fn common_regs() -> crate::pac::adccommon::AdcCommon {
|
fn common_regs() -> crate::pac::adccommon::AdcCommon {
|
||||||
foreach_peripheral!{
|
foreach_peripheral!{
|
||||||
(adccommon, $common_inst:ident) => {
|
(adccommon, $common_inst:ident) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user