Struct atmega_hal::simple_pwm::Timer0Pwm
source · pub struct Timer0Pwm { /* private fields */ }Expand description
Use TC0 for PWM (pins PB7, PG5)
§Example
let mut timer0 = Timer0Pwm::new(dp.TC0, Prescaler::Prescale64);
let mut d13 = pins.d13.into_output().into_pwm(&mut timer0);
let mut d4 = pins.d4.into_output().into_pwm(&mut timer0);
d13.set_duty(128);
d13.enable();