Function stm32wlxx_hal::rcc::hclk2_hz

source ·
pub fn hclk2_hz(rcc: &RCC) -> u32
Available on crate features stm32wl5x_cm4 or stm32wl5x_cm0p only.
Expand description

Calculate the current hclk2 frequency in hertz

Fractional frequencies will be rounded down.

Example

use stm32wlxx_hal::{pac, rcc::hclk2_hz};

let dp: pac::Peripherals = pac::Peripherals::take().unwrap();

// without any initialization hclk2 will be 4MHz
assert_eq!(hclk2_hz(&dp.RCC), 4_000_000);