fix case when chip has multiple iwdg
@@ -40,10 +40,14 @@ mod sealed {
pub trait Instance: sealed::Instance {}
-impl sealed::Instance for crate::peripherals::IWDG {
+foreach_peripheral!(
+ (iwdg, $inst:ident) => {
+ impl sealed::Instance for crate::peripherals::$inst {
fn regs() -> crate::pac::iwdg::Iwdg {
- crate::pac::IWDG
+ crate::pac::$inst
}
}
-impl Instance for crate::peripherals::IWDG {}
+ impl Instance for crate::peripherals::$inst {}
+ };
+);
