pub struct Timer<I> {
    pub channel1: Pwm<I, C1, Unassigned>,
    pub channel2: Pwm<I, C2, Unassigned>,
    pub channel3: Pwm<I, C3, Unassigned>,
    pub channel4: Pwm<I, C4, Unassigned>,
    /* private fields */
}

Fields

channel1: Pwm<I, C1, Unassigned>channel2: Pwm<I, C2, Unassigned>channel3: Pwm<I, C3, Unassigned>channel4: Pwm<I, C4, Unassigned>

Implementations

Create new timer instance that is automatically started with given frequency

Starts the PWM timer

Stops the PWM timer

Update frequency of the timer

Note

In order to do this operation properly the function stop the timer and then starts it again. The duty cycle that was set before for given pin needs to adjusted according to the frequency

Returns the timer, so it can be used by any else

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.