pub mod adc;
#[macro_use]
pub mod ccm;
pub mod dcdc;
#[path = "dma.rs"]
pub mod dma;
#[path = "ocotp.rs"]
pub mod ocotp;
pub mod sai;
pub mod tempmon;
pub mod trng;
cfg_if::cfg_if! {
if #[cfg(chip = "imxrt1010")] {
#[path = "imxrt10xx/imxrt1010.rs"]
pub(crate) mod config;
} else if #[cfg(chip = "imxrt1020")] {
#[path = "imxrt10xx/imxrt1020.rs"]
pub(crate) mod config;
} else if #[cfg(any(chip = "imxrt1060", chip = "imxrt1064"))] {
#[path = "imxrt10xx/imxrt1060.rs"]
pub(crate) mod config;
}
}
pub(crate) mod reexports {
pub use super::{adc, dcdc, ocotp, sai, tempmon, trng};
}
pub(crate) mod iomuxc {
pub use super::config::pads;
use crate::ral;
pub fn into_pads(_: ral::iomuxc::IOMUXC) -> pads::Pads {
unsafe { pads::Pads::new() }
}
}
impl ocotp::Ocotp {
#[inline(always)]
fn read_fuse_data(&self) -> u32 {
crate::ral::read_reg!(crate::ral::ocotp, self.ocotp, READ_FUSE_DATA)
}
#[inline(always)]
fn check_end_fuse_read(&mut self) -> Result<(), ocotp::Error> {
Ok(())
}
#[inline(always)]
fn check_end_fuse_write(&mut self) -> Result<(), ocotp::Error> {
Ok(())
}
const FUSE_ADDRESS_OFFSET: u16 = 0x400;
}