Fix compile for stm32wb

This commit is contained in:
chemicstry 2022-03-18 01:33:39 +02:00
parent b30a42aff8
commit bdeb537ffa
2 changed files with 2 additions and 2 deletions

View file

@ -14,7 +14,7 @@ fn enable() {
crate::pac::RCC.apb2enr().modify(|w| w.set_adcen(true));
#[cfg(stm32g0)]
crate::pac::RCC.apbenr2().modify(|w| w.set_adcen(true));
#[cfg(stm32l4)]
#[cfg(any(stm32l4, stm32wb))]
crate::pac::RCC.ahb2enr().modify(|w| w.set_adcen(true));
});
}

View file

@ -92,7 +92,7 @@ pub struct Dac<'d, T: Instance> {
}
macro_rules! enable {
($enable_reg:ident, $enable_field: ident, $reset_reg:ident, $reset_field:ident) => {
($enable_reg:ident, $enable_field:ident, $reset_reg:ident, $reset_field:ident) => {
crate::pac::RCC
.$enable_reg()
.modify(|w| w.$enable_field(true));