Struct atmega_hal::simple_pwm::Timer0Pwm
source · [−]pub struct Timer0Pwm { /* private fields */ }
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 Send for Timer0Pwm
impl !Sync for Timer0Pwm
impl Unpin for Timer0Pwm
impl UnwindSafe for Timer0Pwm
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more