Function stm32wlxx_hal::rcc::sysclk_hz

source ·
pub fn sysclk_hz(rcc: &RCC) -> u32
Expand description

Calculate the current system clock frequency in hertz

Fractional frequencies will be rounded down.

Example

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

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

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