stm32f446re/
interrupt_service.rsuse crate::chip_specs::Stm32f446Specs;
use stm32f4xx::chip::Stm32f4xxDefaultPeripherals;
pub struct Stm32f446reDefaultPeripherals<'a> {
pub stm32f4: Stm32f4xxDefaultPeripherals<'a, Stm32f446Specs>,
}
impl<'a> Stm32f446reDefaultPeripherals<'a> {
pub unsafe fn new(
clocks: &'a crate::clocks::Clocks<'a, Stm32f446Specs>,
exti: &'a crate::exti::Exti<'a>,
dma1: &'a crate::dma::Dma1<'a>,
dma2: &'a crate::dma::Dma2<'a>,
) -> Self {
Self {
stm32f4: Stm32f4xxDefaultPeripherals::new(clocks, exti, dma1, dma2),
}
}
pub fn init(&'static self) {
self.stm32f4.setup_circular_deps();
}
}
impl kernel::platform::chip::InterruptService for Stm32f446reDefaultPeripherals<'_> {
unsafe fn service_interrupt(&self, interrupt: u32) -> bool {
#[allow(clippy::match_single_binding)]
match interrupt {
_ => self.stm32f4.service_interrupt(interrupt),
}
}
}