[][src]Struct stm32f1xx_hal::time::KiloHertz

pub struct KiloHertz(pub u32);

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();

Trait Implementations

impl Clone for KiloHertz[src]

impl Copy for KiloHertz[src]

impl Debug for KiloHertz[src]

impl Div<KiloHertz> for KiloHertz[src]

type Output = u32

The resulting type after applying the / operator.

impl Div<u32> for KiloHertz[src]

type Output = Self

The resulting type after applying the / operator.

impl DivAssign<u32> for KiloHertz[src]

impl From<KiloHertz> for Hertz[src]

impl From<MegaHertz> for KiloHertz[src]

impl Mul<u32> for KiloHertz[src]

type Output = Self

The resulting type after applying the * operator.

impl MulAssign<u32> for KiloHertz[src]

impl PartialEq<KiloHertz> for KiloHertz[src]

impl StructuralPartialEq for KiloHertz[src]

Auto Trait Implementations

impl Send for KiloHertz

impl Sync for KiloHertz

impl Unpin for KiloHertz

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.