Struct atmega_hal::simple_pwm::Timer2Pwm
source · pub struct Timer2Pwm { /* private fields */ }Expand description
Use TC2 for PWM (pins PB4, PH6)
§Example
let mut timer2 = Timer2Pwm::new(dp.TC2, Prescaler::Prescale64);
let mut d10 = pins.d10.into_output().into_pwm(&mut timer2);
let mut d9 = pins.d9.into_output().into_pwm(&mut timer2);
d10.set_duty(128);
d10.enable();