Function stm32wlxx_hal::rcc::pclk2_hz
source · pub fn pclk2_hz(rcc: &RCC) -> u32
Expand description
Calculate the current PCLK2 frequency in hertz
Fractional frequencies will be rounded down.
Example
use stm32wlxx_hal::{pac, rcc::pclk2_hz};
let dp: pac::Peripherals = pac::Peripherals::take().unwrap();
// without any initialization pclk2 will be 4MHz
assert_eq!(pclk2_hz(&dp.RCC), 4_000_000);