make clock enable function inline
All checks were successful
Rust/va108xx-hal/pipeline/head This commit looks good

This commit is contained in:
Robin Müller 2021-12-18 15:48:14 +01:00
parent de607b1950
commit dc2426a905
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC

View File

@ -50,12 +50,14 @@ pub fn set_clk_div_register(syscfg: &mut SYSCONFIG, clk_sel: FilterClkSel, div:
}
}
#[inline]
pub fn enable_peripheral_clock(syscfg: &mut SYSCONFIG, clock: PeripheralClocks) {
syscfg
.peripheral_clk_enable
.modify(|r, w| unsafe { w.bits(r.bits() | (1 << clock as u8)) });
}
#[inline]
pub fn disable_peripheral_clock(syscfg: &mut SYSCONFIG, clock: PeripheralClocks) {
syscfg
.peripheral_clk_enable