diff options
| -rw-r--r-- | embassy-stm32/src/wdg/mod.rs | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/embassy-stm32/src/wdg/mod.rs b/embassy-stm32/src/wdg/mod.rs index ce3af1484..da25692ab 100644 --- a/embassy-stm32/src/wdg/mod.rs +++ b/embassy-stm32/src/wdg/mod.rs | |||
| @@ -40,10 +40,14 @@ mod sealed { | |||
| 40 | 40 | ||
| 41 | pub trait Instance: sealed::Instance {} | 41 | pub trait Instance: sealed::Instance {} |
| 42 | 42 | ||
| 43 | impl sealed::Instance for crate::peripherals::IWDG { | 43 | foreach_peripheral!( |
| 44 | fn regs() -> crate::pac::iwdg::Iwdg { | 44 | (iwdg, $inst:ident) => { |
| 45 | crate::pac::IWDG | 45 | impl sealed::Instance for crate::peripherals::$inst { |
| 46 | } | 46 | fn regs() -> crate::pac::iwdg::Iwdg { |
| 47 | } | 47 | crate::pac::$inst |
| 48 | } | ||
| 49 | } | ||
| 48 | 50 | ||
| 49 | impl Instance for crate::peripherals::IWDG {} | 51 | impl Instance for crate::peripherals::$inst {} |
| 52 | }; | ||
| 53 | ); | ||
