stm32: Allow for RccPeripheral without reset field

This fix build on F0, since it doesn't have DMARST. This change makes
RccPeripheral::reset a no-op on peripherals where a reset field couldn't
be found
This commit is contained in:
Thales Fragoso
2021-07-15 13:25:51 -03:00
parent 8a172ac123
commit 2f08c7ced5
3 changed files with 77 additions and 24 deletions

View File

@ -177,7 +177,7 @@ pub(crate) unsafe fn init() {
}
pac::peripherals! {
(bdma, $peri:ident) => {
crate::peripherals::$peri::enable();
<crate::peripherals::$peri as RccPeripheral>::enable();
};
}
}