#![cfg_attr(not(test), no_std)]
#![cfg_attr(docsrs, feature(doc_cfg))]
#![allow(non_camel_case_types)]
extern crate paste;
#[cfg(not(feature = "device-selected"))]
compile_error!(
"This crate requires one of the following device features enabled:
stm32h742
stm32h743
stm32h753
stm32h750
stm32h742v
stm32h743v
stm32h753v
stm32h750v
stm32h747cm7
stm32h757cm7
stm32h7b3
stm32h7b0
stm32h7a3
stm32h735
"
);
pub use embedded_hal as hal;
pub mod traits;
pub use nb;
pub use nb::block;
#[cfg(any(
feature = "stm32h742",
feature = "stm32h743",
feature = "stm32h750",
))]
pub use stm32h7::stm32h743 as stm32;
#[cfg(any(
feature = "stm32h742v",
feature = "stm32h743v",
feature = "stm32h750v",
))]
pub use stm32h7::stm32h743v as stm32;
#[cfg(feature = "stm32h753")]
pub use stm32h7::stm32h753 as stm32;
#[cfg(feature = "stm32h753v")]
pub use stm32h7::stm32h753v as stm32;
#[cfg(feature = "stm32h747cm7")]
pub use stm32h7::stm32h747cm7 as stm32;
#[cfg(feature = "stm32h757cm7")]
pub use stm32h7::stm32h757cm7 as stm32;
#[cfg(any(
feature = "stm32h7b3",
feature = "stm32h7a3",
feature = "stm32h7b0",
))]
pub use stm32h7::stm32h7b3 as stm32;
#[cfg(feature = "stm32h735")]
pub use stm32h7::stm32h735 as stm32;
#[cfg(all(feature = "rm0433", feature = "rm0399"))]
compile_error!("Cannot not select both rm0433 and rm0399");
#[cfg(all(feature = "cm7", feature = "cm4"))]
compile_error!("Cannot not select both CM7 and CM4");
#[cfg(feature = "device-selected")]
pub use crate::stm32 as pac;
#[cfg(feature = "device-selected")]
pub use crate::stm32 as device;
#[cfg(feature = "rt")]
#[cfg_attr(docsrs, doc(cfg(feature = "rt")))]
pub use crate::stm32::interrupt;
#[cfg(feature = "device-selected")]
pub mod adc;
#[cfg(all(feature = "device-selected", feature = "can"))]
#[cfg_attr(docsrs, doc(cfg(feature = "can")))]
pub mod can;
#[cfg(all(feature = "device-selected", feature = "crc"))]
#[cfg_attr(docsrs, doc(cfg(feature = "crc")))]
pub mod crc;
#[cfg(feature = "device-selected")]
pub mod dac;
#[cfg(feature = "device-selected")]
pub mod delay;
#[cfg(feature = "device-selected")]
pub mod dma;
#[cfg(all(feature = "device-selected", feature = "dsi", feature = "rm0399"))]
pub mod dsi;
#[cfg(all(
feature = "device-selected",
feature = "ethernet",
not(feature = "rm0455")
))]
#[cfg_attr(docsrs, doc(cfg(feature = "ethernet")))]
pub mod ethernet;
#[cfg(feature = "device-selected")]
pub mod exti;
#[cfg(feature = "device-selected")]
pub mod flash;
#[cfg(all(feature = "device-selected", feature = "fmc"))]
#[cfg_attr(docsrs, doc(cfg(feature = "fmc")))]
pub mod fmc;
#[cfg(feature = "device-selected")]
pub mod gpio;
#[cfg(feature = "device-selected")]
pub mod i2c;
#[cfg(feature = "device-selected")]
pub mod independent_watchdog;
#[cfg(all(feature = "device-selected", feature = "ltdc"))]
#[cfg_attr(docsrs, doc(cfg(feature = "ltdc")))]
pub mod ltdc;
#[cfg(feature = "device-selected")]
pub mod prelude;
#[cfg(feature = "device-selected")]
pub mod pwm;
#[cfg(feature = "device-selected")]
pub mod pwr;
#[cfg(feature = "device-selected")]
pub mod qei;
#[cfg(feature = "device-selected")]
pub mod rcc;
#[cfg(feature = "device-selected")]
pub mod rng;
#[cfg(all(feature = "device-selected", feature = "rtc"))]
#[cfg_attr(docsrs, doc(cfg(feature = "rtc")))]
pub mod rtc;
#[cfg(feature = "device-selected")]
pub mod sai;
#[cfg(all(feature = "device-selected", feature = "sdmmc"))]
#[cfg_attr(docsrs, doc(cfg(feature = "sdmmc")))]
pub mod sdmmc;
#[cfg(feature = "device-selected")]
pub mod serial;
#[cfg(feature = "device-selected")]
pub mod signature;
#[cfg(feature = "device-selected")]
pub mod spi;
#[cfg(feature = "device-selected")]
pub mod system_watchdog;
#[cfg(feature = "device-selected")]
pub mod time;
#[cfg(feature = "device-selected")]
pub mod timer;
#[cfg(all(feature = "device-selected", feature = "usb_hs"))]
#[cfg_attr(docsrs, doc(cfg(feature = "usb_hs")))]
pub mod usb_hs;
#[cfg(all(feature = "device-selected", feature = "xspi"))]
#[cfg_attr(docsrs, doc(cfg(feature = "xspi")))]
pub mod xspi;
#[cfg(feature = "device-selected")]
mod sealed {
pub trait Sealed {}
}
#[cfg(feature = "device-selected")]
pub(crate) use sealed::Sealed;
fn stripped_type_name<T>() -> &'static str {
let s = core::any::type_name::<T>();
let p = s.split("::");
p.last().unwrap()
}