pub struct Timer0Pwm { /* private fields */ }Available on crate features
board-selected and mcu-atmega only.Expand description
Use TC0 for PWM (pins PD5, PD6)
§Example
let mut timer0 = Timer0Pwm::new(dp.TC0, Prescaler::Prescale64);
let mut d5 = pins.d5.into_output().into_pwm(&mut timer0);
let mut d6 = pins.d6.into_output().into_pwm(&mut timer0);
d5.set_duty(128);
d5.enable();Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Timer0Pwm
impl !Sync for Timer0Pwm
impl Freeze for Timer0Pwm
impl Send for Timer0Pwm
impl Unpin for Timer0Pwm
impl UnsafeUnpin for Timer0Pwm
impl UnwindSafe for Timer0Pwm
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more