Function stm32wlxx_hal::rcc::lsi_hz

source ·
pub fn lsi_hz(rcc: &RCC) -> u16
Expand description

Calculate the LSI clock frequency in hertz.

The LSI is either 32 kHz without the LSI prescaler or 250 Hz with the LSI prescaler.

Example

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

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

// LSI is not divided at power on
assert_eq!(lsi_hz(&dp.RCC), 32_000);