Module stm32f412g::clocks::hsi
source · Expand description
HSI (high-speed internal) clock driver for the STM32F4xx family. 1
§Usage
For the purposes of brevity, any error checking has been removed. In real applications, always check the return values of the Hsi methods.
First, get a reference to the Hsi struct:
ⓘ
let hsi = &peripherals.stm32f4.clocks.hsi;
§Start the clock
ⓘ
hsi.enable();
§Stop the clock
ⓘ
hsi.disable();
§Check if the clock is enabled
ⓘ
if hsi.is_enabled() {
/* Do something */
} else {
/* Do something */
}
§Get the frequency of the clock
ⓘ
let hsi_frequency_mhz = hsi.get_frequency().unwrap();
See 6.2.2 in the documentation. ↩
Modules§
- Tests for the HSI clock
Structs§
- Main HSI clock structure
Constants§
- HSI frequency in MHz