pub struct Timer2Pwm { /* private fields */ }
Expand description

Use TC2 for PWM (pins PB3, PD3)

Example

let mut timer2 = Timer2Pwm::new(dp.TC2, Prescaler::Prescale64);

let mut d11 = pins.d11.into_output().into_pwm(&mut timer2);
let mut d3 = pins.d3.into_output().into_pwm(&mut timer2);

d11.set_duty(128);
d11.enable();

Implementations

Trait Implementations

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.