Trait stm32_hal2::traits::ClockCfg [−][src]
pub trait ClockCfg {
fn sysclk(&self) -> u32;
fn hclk(&self) -> u32;
fn systick(&self) -> u32;
fn usb(&self) -> u32;
fn apb1(&self) -> u32;
fn apb1_timer(&self) -> u32;
fn apb2(&self) -> u32;
fn apb2_timer(&self) -> u32;
fn validate_speeds(&self) -> ClocksValid;
}This trait allows you to return information about a common’s speeds. It’s used for configuring peripherals.
Required methods
fn sysclk(&self) -> u32[src]
System clock speed, in Hz.
fn hclk(&self) -> u32[src]
HCLK speed, in Hz. Ie AHB bus, core, memory, and DMA.
fn systick(&self) -> u32[src]
Cortex System timer speed, in Hz.
fn usb(&self) -> u32[src]
USB speed, in Hz.
fn apb1(&self) -> u32[src]
APB1 peripheral common speed, in Hz.
fn apb1_timer(&self) -> u32[src]
APB1 timer common speed, in Hz.
fn apb2(&self) -> u32[src]
APB2 timer common speed, in Hz.
fn apb2_timer(&self) -> u32[src]
APB2 peripheral common speed, in Hz.
fn validate_speeds(&self) -> ClocksValid[src]
Validate that the clocks speeds are all within the acceptable range
for the MCU
// todo Separate USB validation? back to Validation enum, or keep it simple?
Implementors
Loading content...