[][src]Enum avr_hal_generic::simple_pwm::Prescaler

pub enum Prescaler {
    Direct,
    Prescale8,
    Prescale64,
    Prescale256,
    Prescale1024,
}

Clock prescaler for PWM

The prescaler dictates the PWM frequency, together with the IO clock. The formula is as follows:

F_pwm = CLK_io / (Prescaler * 256);
Prescaler16 MHz Clock8 MHz Clock
Direct62.5 kHz31.3 kHz
Prescale87.81 kHz3.91 kHz
Prescale64977 Hz488 Hz
Prescale256244 Hz122 Hz
Prescale102461.0 Hz30.5 Hz

Variants

Direct

No prescaling, the IO clock drives the timer directly.

Prescale8

Divide the IO clock by 8.

Prescale64

Divide the IO clock by 64.

Prescale256

Divide the IO clock by 256.

Prescale1024

Divide the IO clock by 1024.

Trait Implementations

impl Clone for Prescaler[src]

impl Copy for Prescaler[src]

impl Debug for Prescaler[src]

impl Eq for Prescaler[src]

impl Ord for Prescaler[src]

impl PartialEq<Prescaler> for Prescaler[src]

impl PartialOrd<Prescaler> for Prescaler[src]

impl StructuralEq for Prescaler[src]

impl StructuralPartialEq for Prescaler[src]

Auto Trait Implementations

impl Send for Prescaler[src]

impl Sync for Prescaler[src]

impl Unpin for Prescaler[src]

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, 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.