Struct atmega_hal::simple_pwm::Timer2Pwm
source · 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§
impl Freeze for Timer2Pwm
impl RefUnwindSafe for Timer2Pwm
impl Send for Timer2Pwm
impl !Sync for Timer2Pwm
impl Unpin for Timer2Pwm
impl UnwindSafe for Timer2Pwm
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