stm32: document hrtim, qspi, sdmmc, spi.

This commit is contained in:
Dario Nieuwenhuis
2023-12-19 16:18:24 +01:00
parent c995732b0e
commit 1ea87ec6e7
8 changed files with 132 additions and 58 deletions

View File

@ -8,14 +8,17 @@ use core::ops::{Div, Mul};
pub struct Hertz(pub u32);
impl Hertz {
/// Create a `Hertz` from the given hertz.
pub const fn hz(hertz: u32) -> Self {
Self(hertz)
}
/// Create a `Hertz` from the given kilohertz.
pub const fn khz(kilohertz: u32) -> Self {
Self(kilohertz * 1_000)
}
/// Create a `Hertz` from the given megahertz.
pub const fn mhz(megahertz: u32) -> Self {
Self(megahertz * 1_000_000)
}