embassy_stm32_plus/traits/wdg/mod.rs
1use embassy_stm32::Peripheral;
2use embassy_stm32::peripherals::IWDG;
3use embassy_stm32::wdg::{IndependentWatchdog, Instance};
4
5/// wdg trait
6pub trait WdgTrait: Peripheral<P=Self> + Instance {
7 fn build(self, timeout_us: u32) -> IndependentWatchdog<'static, Self> {
8 IndependentWatchdog::new(self, timeout_us)
9 }
10}
11
12/// support iwdg
13impl WdgTrait for IWDG {}