Struct gd32f1x0_hal::time::KiloHertz
source · [−]pub struct KiloHertz(pub u32);
Expand description
Kilohertz
Create a frequency specified in kilohertz.
See also Hertz
and MegaHertz
for semantically correct ways of creating lower or higher
frequencies.
Examples
Create a 100 Khz frequency
This example creates a 100 KHz frequency. This could be used to set an I2C data rate or PWM frequency, etc.
use stm32f1xx_hal::time::Hertz;
let freq = 100.khz();
Tuple Fields
0: u32
Trait Implementations
sourceimpl DivAssign<u32> for KiloHertz
impl DivAssign<u32> for KiloHertz
sourcefn div_assign(&mut self, rhs: u32)
fn div_assign(&mut self, rhs: u32)
Performs the /=
operation. Read more
sourceimpl MulAssign<u32> for KiloHertz
impl MulAssign<u32> for KiloHertz
sourcefn mul_assign(&mut self, rhs: u32)
fn mul_assign(&mut self, rhs: u32)
Performs the *=
operation. Read more
impl Copy for KiloHertz
impl StructuralPartialEq for KiloHertz
Auto Trait Implementations
impl RefUnwindSafe for KiloHertz
impl Send for KiloHertz
impl Sync for KiloHertz
impl Unpin for KiloHertz
impl UnwindSafe for KiloHertz
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more